Page 1 of 1

need to pass info thru $_POST manually

Posted: Wed Feb 07, 2007 9:24 pm
by Kaervek
i have a page with a form and a submit button

i have a variable in php that i want to pass forward when the form is submitted and the page reloads.

$_POST['varname'] = $variable;

does not seem to work

any suggestions?

Posted: Wed Feb 07, 2007 9:56 pm
by volka
Add a hidden field with the parameter you want to pass with the next request to the form
<input tpye="hidden" name="foo" value="bar" />

Posted: Wed Feb 07, 2007 10:55 pm
by Kaervek
OK
but is that the only way to do this?

Posted: Thu Feb 08, 2007 9:24 am
by feyd