highaspen Posted March 1, 2006 Share Posted March 1, 2006 I'm trying to redirect the browser by inputing a dynamic URL from a database. Here is the code after the database login procedure.__________________$rs=mysql_query($sql,$conn) or die("Could not execute query");$list ="<html>";while($row= mysql_fetch_array($rs) ){$list.="<meta HTTP-EQUIV=Refresh CONTENT='1;URL=".$row["productlink"]."></html>";}echo($list);?>_____________________What happens is the browser looks like it's in an endless loop. I'm guess there is a better way to do this. ANy ideas?Thanks in advance. Link to comment https://forums.phpfreaks.com/topic/3871-browser-redirect/ Share on other sites More sharing options...
php_b34st Posted March 1, 2006 Share Posted March 1, 2006 Try:[code]$url = $row["productlink"];header("Location: $url");[/code] Link to comment https://forums.phpfreaks.com/topic/3871-browser-redirect/#findComment-13429 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.