Page 1 of 1

[SOLVED] - FORM NAME not sent in $_POST

Posted: Wed Aug 18, 2004 12:56 am
by anjanesh
Why doesn't the FORM NAME not sent in $_POST ?

Code: Select all

if (isset ($_POST['Form1']))
{
echo 'This is never printed';
}
<FORM NAME=Form1 ACTION="" METHOD=POST>
//.....other input fields
</FORM>

Posted: Wed Aug 18, 2004 1:07 am
by feyd
why should it? what value would get sent with it?

Posted: Wed Aug 18, 2004 1:08 am
by protokol
I'm not sure why it doesn't send for you on POST. But if you really need that kind of information, just use a <input type="hidden" ...> tag and put the information there.

Posted: Wed Aug 18, 2004 8:35 am
by hawleyjr
this.form.name will call the form name in javascript.

Posted: Wed Aug 18, 2004 9:19 am
by d3ad1ysp0rk
It doesn't send it because that IS the form, not part of it. Like it's been suggested before, trying sending a hidden variable, or checking a variable that you know will have a value.

Posted: Wed Aug 18, 2004 9:39 am
by anjanesh
Alright. Thanks guys. I did use a hidden input. Just thought that might work too.
Anyway. Thanks