Header location: inq...

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

Post Reply
robin1
Forum Newbie
Posts: 20
Joined: Thu Aug 01, 2002 4:36 pm

Header location: inq...

Post 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
tr3s
Forum Newbie
Posts: 17
Joined: Mon May 19, 2003 10:29 am
Location: Philippines
Contact:

Post 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.
[]InTeR[]
Forum Regular
Posts: 416
Joined: Thu Apr 24, 2003 6:51 am
Location: The Netherlands

Post by []InTeR[] »

<?php
Header("location: myquedetail.php?var=$recordnum");
?>

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