I've to redirect my user to a webpage based on his name and date. If his name does not match or his ID has expired I need to send him to a different page. If he passes these two conditions I need to redirect him to a webpage eg. www.google.com
$name_value=$_GET['query'];
$fh = fopen('db.csv', 'r');
$now = date();
$data=fgetcsv($fh);
$name=$data[0];
$date=$data[1];
$url=$data[2];
if($name_value == $name)
{
if($date==$now)
{
header("Location:".$data[2]);
}
}
else
{
echo("not successful");
}
exit;
This is the CSV file contents
merch,26.06.2011,http://www.google.com
My problem is that the Header is not redirecting to the webpage. Any help would be greatly appreciated.