Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Garry Jones
April 28, 2006, 2:15 pm
rate this thread
redirect the user to a "thank you" page with Header. What I would like is to
remind the user the value he/she keyed in. Can I pass the variable in the
What I want to do in the following is echo the value of $inx01 in
mysql_connect(" Codes Removed ") or die(mysql_error());
mysql_select_db(" Database Name removed ") or die(mysql_error());
mysql_query("INSERT INTO table1 VALUES ('$inx01')");
Header("Location: http://www.mydomain.com/thankyou.php ");
Re: Pass value to header?
There are two different methods you can use:
1) Put the value into a session variable. Before the 'header()"
$_SESSION['inx01'] = $inx01;
Then in the thankyou.php script, you can get the value by referencing
Be sure you put
at the start of each script.
2) Pass the value on the URL:
header('Location: http://www.mydomain.com/thankyou.php?inx01 =' .
and the you can use the value in $_GET['inx01']