header("Location:$f[www]");
Posted: Tue Jul 20, 2004 2:45 am
feyd | LAST WARNING use
Hey, Im running PHP mydirectory and when a link is clicked to run out.php it will update that someone clicked the link in the MYSQL database but won't show the link, just: http://www.mysite.com/dir/out.php?ID=1
If I swap header("Location:$f[www]"); for echo "$f[www]"; it will display the link the so theres no problem retrieving that, thus the problem must be with the header and location command. Any way round this?? Many thanks...
feyd | LAST WARNING use
Code: Select all
tags when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]Code: Select all
<?php
include ( "defaults.php" );
include ( "connect.php" );
$r=mysql_query("SELECT www, webcounter FROM $db_users WHERE selector=$_GET[ID]") or die
(mysql_error());
$f=mysql_fetch_array($r);
$f[webcounter]++;
mysql_query("UPDATE $db_users SET webcounter=$f[webcounter] WHERE selector=$_GET[ID]")
or die (mysql_error());
header("Location:$f[www]");
mysql_close();
exit();
?>If I swap header("Location:$f[www]"); for echo "$f[www]"; it will display the link the so theres no problem retrieving that, thus the problem must be with the header and location command. Any way round this?? Many thanks...
feyd | LAST WARNING use
Code: Select all
tags when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]