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:

<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>

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!

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:

<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">

Here is the php "submit" page:

<?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

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?

This isn't the PHP forum, and your project is a bit too involved for the casual volunteer to help out. Forums such as this are best used for very specific questions about a particular aspect of HTML/CSS/JavaScript.

Wow... I am so sorry. I seriously thought that I had clicked the php forum. Crap. Ok, well, I have fixed most of this. Thanks for the reminder. ^_^

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.