Re: header redirection

From: Date: Wed, 21 Mar 2001 14:16:39 +0000
Subject: Re: header redirection
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-44965@lists.php.net to get a copy of this message
header("Location: http://$SERVER_NAME/$redirurl"); or better header("Location: http://$SERVER_NAME/$redirurl?$SID"); where $SID = "PHPSESSID=". session_id(); this way your sessions will carry if your not using cookies and are using --enable-trans-sid i <dean@aaddesign.com> wrote in message news:NEBBKIIBELIJLOOCGNKPOEIKCBAA.dean@aaddesign.com... Why wouldn't this redirect? The query works, but the page won't redirect. I have used the same two lines successfully on other pages. I'm very tired, it's probably obvious. <?php // assuming $uid, $itemid, $week, $cur_wk in querystring //connect to db $db = mysql_connect ("localhost","user","password"); mysql_select_db("mydb",$db); //update item - weekX to Taken and record buyer $sql = "update items set week" . $week . " = 'T', buyerID = " . $uid . " where itemID = " . $itemid; $result = mysql_query($sql); $redirurl = "bid.php?uid=" . $uid . "&itemid=" . $itemid; header ($redirurl); ?> G'Night Dean -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#44965) next »