Forum Moderators: coopster
if ($m == "link1") {$link = "http://www.example.com";}
if ($m == "") {$link = "http://www.example.com";}
header("Location: $link"); if ($m == "link1") {$link = "http://www.example.com";}
if ($m == "") {$link = "http://www.example.com";}
header("Location: $link");
if(isset($m)) {
if($m == "link1") {
$link = "http://www.example.com";
} elseif($m == "") {
$link = "http://www.example.com";
} else {
$link = "http://LinkNotFoundPage.html"; /*a catch page for any links that don't match */
}
header("Location: ".$link);
}
$link = array(
/*Links*/
'e1'=>'http://www.example1.com/',
'e2'=>'http://www.example2.com/',
'e3'=>'http://www.example3.com/',
);
/*Send Headers*/
header('Content-Type: text/html; charset=utf-8');
header('X-Robots-Tag: noindex, nofollow, noarchive', true);
if (array_key_exists('m', $_GET) && isset($link[$m]))
{
header('Location: '.$link[$m]); // Valid m
}
else
{
header('Location: http://www.example.com'); // Invalid m
}
exit(); 'e1'=>'http://www.example1.com/',
'e2'=>'http://www.example1.com/',
'e1' || 'e2' =>'http://www.example1.com/',