PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
Kaervek
Forum Commoner
Posts: 25 Joined: Fri Jul 08, 2005 7:17 am
Location: Newfoundland
Contact:
Post
by Kaervek » Wed Feb 07, 2007 9:24 pm
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?
volka
DevNet Evangelist
Posts: 8391 Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger
Post
by volka » Wed Feb 07, 2007 9:56 pm
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" />
Kaervek
Forum Commoner
Posts: 25 Joined: Fri Jul 08, 2005 7:17 am
Location: Newfoundland
Contact:
Post
by Kaervek » Wed Feb 07, 2007 10:55 pm
OK
but is that the only way to do this?
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Thu Feb 08, 2007 9:24 am