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. Quote Link to comment 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] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.