PDA

View Full Version : Form not posting?


iceflyin
09-14-2007, 03:14 PM
Edit: Oops, body tag before php...

My bad...



//When I hit Submit, It appears to post back to the page, then nothing... Wtf?
if (isset($_POST[cid])){
echo $_POST[cid];
//Do stuff
};


echo "
<form action=\"manageEvents.php\" method=\"post\">
<p><label for=\"location\">Location: </label> <input type=\"text\" name=\"location\" size=\"20\" maxlength=\"64\"/></p>

//CID is being set to a number, I checked that...
<input type=\"hidden\" name=\"cid\" value=\"$cid\" />
<center><input type=\"submit\" value=\"Add\"/></center>
</form>
";

Inigoesdr
09-14-2007, 05:12 PM
View the source of the form page to see if the "cid" input is being set from the variable.

This line:
};
doesn't need the ;

iceflyin
09-14-2007, 05:58 PM
I had a body tag before my PHP script, thats what killed it.