RE: [PHP] querystrings passed in header("Location: n") ?
| From: | Rick Emery | Date: | Wed, 13 Feb 2002 14:53:08 +0000 |
| Subject: | RE: [PHP] querystrings passed in header("Location: n") ? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-84578@lists.php.net to get a copy of this message | ||
try:
header("Location:
domain.com/errorpage.php?errorcode=".urlencode($errorcode));
-----Original Message-----
From: Erik Price [mailto:pricee@hhbrown.com]
Sent: Wednesday, February 13, 2002 8:51 AM
To: PHP
Subject: [PHP] querystrings passed in header("Location: n") ?
Can you pass a querystring along in header("Location: n")?
This is my code:
// get name of current page
$errorcode = basename($_SERVER['PHP_SELF']);
// send them to "error" page with previous page's name in $_GET array
header("Location: domain.com/errorpage.php?errorcode=$errorcode");
See what I'm doing? Trying to send the "errorpage.php" a variable in
the querystring to identify which page sent them there. I'd like to
avoid HTTP_REFERER for now, if possible. But when I get sent to
"errorpage.php", there is no querystring at all.
Thanks,
Erik
----
Erik Price
Web Developer Temp
Media Lab, H.H. Brown
pricee@hhbrown.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php