Re: header redirection

From: Date: Wed, 21 Mar 2001 13:53:12 +0000
Subject: Re: header redirection
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-44946@lists.php.net to get a copy of this message
On Tue, Mar 20, 2001 at 10:05:06PM -0800, dean@aaddesign.com wrote: > 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); > ?> It appears your code is missing the "Location: " part of the header. -- Jason Stechschulte jpstech@unoh.edu -- It's getting harder and harder to think out loud. One of these days someone's gonna go off and kill Thomas a'Becket for me... -- Larry Wall in <199709242015.NAA10312@wall.org>

« previous php.general (#44946) next »