php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5670 Header Function - Hidden Variable
Submitted: 2000-07-19 06:24 UTC Modified: 2000-07-19 08:27 UTC
From: bportis at hotmail dot com Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0 Latest CVS (19/07/2000) OS: Redhat Linux 6.1
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: bportis at hotmail dot com
New email:
PHP Version: OS:

 

 [2000-07-19 06:24 UTC] bportis at hotmail dot com
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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-19 08:27 UTC] stas at cvs dot php dot net
This is not a PHP bug.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sat Oct 10 17:00:01 2026 UTC