Page 1 of 1

Header location: inq...

Posted: Sun May 25, 2003 9:34 pm
by robin1
hello everybody,

how do u go about sending or adding a variable to the following code
Header("location: myquedetail.php");

myquedetail.php displayes informaiton and on the same page a textfeld is provided to append to the database field...i'm able to added to a field but the above code reloades the page but not with the information that was added in the field.. so is there a way to send the record number with Header("location: myquedetail.php"); to reload the page with newely added info

Posted: Sun May 25, 2003 11:09 pm
by tr3s
you can do a

Code: Select all

<?php
Header("location: myquedetail.php?var=$recordnum");
?>
and call the var once the page has been reloaded using

Code: Select all

<?php
$recordnum = $_GET['var'];
?>
note however that the record number is visible at the querystring so you shouldn't use this method if $recordnum is not confidential.

Posted: Mon May 26, 2003 3:30 am
by []InTeR[]
<?php
Header("location: myquedetail.php?var=$recordnum");
?>

The header must be "Location: absoluteURI".
See RC 2616