Hi can anybody see a problem with this script i am getting: Parse error: syntax error, unexpected '"' in /home/public_html/test.php on line 6?? I highlighted line 6 in red, <?php header( 'Location: <?php mysql_connect("localhost", "username", "password") or die(mysql_error()); mysql_select_db("links") or die(mysql_error()); $id = $_GET["id"]; $linkQuery = mysql_query("SELECT * FROM `links` WHERE `id`='".$id."' LIMIT 1") or die(mysql_error()); $link = mysql_fetch_array($linkQuery); echo "".$link['link'] . ""; ?>' ) ; ?> I am trying to have a variable link as a redirect
What are you trying to do? The code doesn't make sense. Try it this way. <?php mysql_connect("localhost", "username", "password") or die(mysql_error()); mysql_select_db("links") or die(mysql_error()); $id = $_GET["id"]; $linkQuery = mysql_query("SELECT * FROM `links` WHERE `id`='".$id."' LIMIT 1") or die(mysql_error()); $link = mysql_fetch_array($linkQuery); header('Location: ' . $link['link']); ?> PHP:
oh you know passing the time trying a few new random things with link structure & seo, thanks that works great!