| | |
Help with making a survey form
Please support our HTML and CSS advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: May 2006
Posts: 7
Reputation:
Solved Threads: 0
Hey guys, I was curious if someone would be able to provide advice on how to do this... Basically I want to create a simple web-form that has a bunch of questions and allows the user to answer them. Then it has to pass the list of questions under one "name" element. Here is what I have so far:
Basically it passes these elements to the Myspace bulletin form to automatically post the questions and answers in the users bulletin. It works pretty well how I set it up, except around each answer (the "input type="text"" boxes) there is a comma when you see the output. Alittle confusing I know. You can see a example here: http://www.bloonlabs.com/myspacequiz.htm
Hope someone can help!
HTML and CSS Syntax (Toggle Plain Text)
<form name="bulletinForm" method="post" target="_self" action="http://bulletin.myspace.com/index.cfm?fuseaction=bulletin.edit"> <input type="hidden" value="0" name="groupID"> <input class="htmlgenscom" type="hidden" maxLength="50" size="1" value="The Greatest Survey Ever!" name="subject"> <p>Question 1?</p> <textarea class="htmlgenscom" name="body" type="hidden" style="width: 0px; height: 0px;" rows="1" cols="20"><ul><li><b>Question 1?</b><br></textarea> <input type="text" name="body" size="30" maxlength="100" rows="1" cols="20"> <p>Question 2</p> <textarea class="htmlgenscom" name="body" type="hidden" style="width: 0px; height: 0px;" rows="1" cols="20"></li><li><b>Question 2?</b><br></textarea> <input type="text" name="body" size="30" maxlength="100" rows="1" cols="20"> <textarea class="htmlgenscom" name="body" type="hidden" style="width: 0px; height: 0px;" rows="1" cols="20"></li></ul></textarea><br><br> <input type=submit class=submit value="Post the Survey on Myspace!" name="submit0" target="_blank"> </form>
Hope someone can help!
•
•
Join Date: May 2006
Posts: 7
Reputation:
Solved Threads: 0
I am trying to make it in php so I can "build the textbox" in a php file then have the user submit it. I have two questions however:
1. I am getting lots of random php errors like "unexpected T-string" of which I can see no error...
2. Could I make the php file automatically submit the "textbox" or information to the myspace post bulliton form? Rather than making the user press a second button?
Here is my code (this is only the code within the body tags...):
First page:
Here is the php "submit" page:
A live example can be found here: http://www.bloonlabs.com/myspacequiz/test.htm
1. I am getting lots of random php errors like "unexpected T-string" of which I can see no error...
2. Could I make the php file automatically submit the "textbox" or information to the myspace post bulliton form? Rather than making the user press a second button?
Here is my code (this is only the code within the body tags...):
First page:
HTML and CSS Syntax (Toggle Plain Text)
<div align="center"><form name="bulletinForm" method="post" target="_self" action="submit.php"> <p>Who is the last person you high-fived?: <textarea class="htmlgenscom" name="question1" type="hidden" style="width: 0px; height: 0px;" rows="1" cols="20">Who is the last person you high-fived?</textarea> <input type="text" name="answer1" size="30" maxlength="100" rows="1" cols="20"></p> <p>If you were drafted into a war, would you survive?: <textarea class="htmlgenscom" name="question2" type="hidden" style="width: 0px; height: 0px;" rows="1" cols="20">If you were drafted into a war, would you survive?</textarea> <input type="text" name="answer2" size="30" maxlength="100" rows="1" cols="20"></p> <input type="submit" value="Post this survey on your Myspace!" name="submit"> </form><div align="center">
HTML and CSS Syntax (Toggle Plain Text)
<?php $question1 = $_POST['question1']; $question2 = $_POST['question2']; $answer1 = $_POST['answer1']; $answer2 = $_POST['answer2']; echo ("<div align="center"> <form name="bulletinForm" method="post" target="_self" action="bulletin.myspace.com\index.cfm?fuseaction=bulletin.edit"> <input type="hidden" value="0" name="groupID"> <input class="htmlgenscom" type="hidden" maxLength="50" size="1" value="The Greatest Survey Ever" name="subject"> <br> <textarea class="htmlgenscom" name="body" type="hidden" rows="1" cols="20"> "); echo ($question1 . ": " . $answer1 . "<br> " . $question2 . ": " . $answer2); echo ("</textarea> <br> <br> <input type="submit" class="submit" value="Press here to Submit!" name="submit" target="_blank"> </form> </div> "); ?>
A live example can be found here: http://www.bloonlabs.com/myspacequiz/test.htm
Last edited by qbit; Jun 15th, 2006 at 4:54 pm.
•
•
Join Date: May 2006
Posts: 7
Reputation:
Solved Threads: 0
Ok, I fixed my unexpected T_string error, but how would I go about making the "submit.php" file automatically submit the text box to the myspace post bulleton?
And another question, how can I make my php-submit form automatically count how many questions and answers are passed onto it?
And another question, how can I make my php-submit form automatically count how many questions and answers are passed onto it?
Last edited by qbit; Jun 15th, 2006 at 5:07 pm.
![]() |
Similar Threads
- Best way to develop db for survey? (Database Design)
- Making a Fullscreen form and hiding the Windows Taskbar (Pascal and Delphi)
- Automating survey results to email on submit. (Java)
Other Threads in the HTML and CSS Forum
- Previous Thread: RollOver
- Next Thread: CSS hover on individual link (li) ???
| Thread Tools | Search this Thread |
appointments asp background backgroundcolor beta browser bug calendar cart cgi code codeinjection corporateidentity css design development displayimageinsteadofflash dreamweaver emailmarketing epilepsy explorer firefox flash form format google griefers hackers hitcounter hover html ide ie7 ie8 iframe image images internet internetexplorer intranet iphone javascript jpeg layout macbook maps marketshare microsoft mozilla multimedia navigationbars news offshoreoutsourcingcompany opacity opera optimization pnginie6 positioning problem scroll seo shopping studio swf swf. textcolor timecolor titletags url urlseparatedwords visual visualization web webdevelopment webform website windows7






