|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-07-19 08:27 UTC] stas at cvs dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 10 20:00:02 2026 UTC |
I am having trouble passing hidden variables when I use the header function. The hidden variable appears in the URL, even when I have declared it as hidden. For example: File1.php <HTML> <HEAD> <TITLE>Setting Prefs</TITLE> </HEAD> <? $test_variable="TestingHiddenVariable"; ?> <FORM METHOD="POST" ACTION="File2.php?"> <input type="hidden" name="test_variable" value="<?echo $test_variable ?>"> </FORM> </BODY> </HTML> File2.php <? $new_test_variable = "DidItWork"; $test_variable = $new_test_variable; Header("Location: File3.php?test_variable=$test_variable"); ?> File3.php <HTML> <HEAD> <TITLE>Setting Prefs</TITLE> </HEAD> <FORM METHOD="POST" ACTION="File4.php"> <input type="hidden" name="test_variable" value="<?echo $test_variable ?>"> </FORM> </BODY> </HTML> After the header function calls File3.php. The url has ...File3.php?test_variable=DidItWork If anyone have a clue how to pass hidden variables using the header function please let me know. Your help will be greatly appreciated. Thanks