View Single Post
Old 03-20-2010, 01:43 AM  
Sands
Confirmed User
 
Sands's Avatar
 
Join Date: Feb 2007
Location: 418194907
Posts: 3,134
Quote:
Originally Posted by moeloubani View Post
Why isn't this working? I'm linking to ?m=a and its going to the blank one every time

Code:
<?php
if ($m == "b") {$link = "http://siteb.com";}
if ($m == "c") {$link = "http://siteb.com";}
if ($m == "a") {$link = "http://siteb.com";}
if ($m == "") {$link = "http://siteb.com";}
header("Location: $link");
exit();
?>
Is there something in there that's grabbing the url variable that's designating the link, but you've left it out of the snippet you've pasted? Like:

Code:
$m = $_GET['m'];
Or something to that effect. If that's not there, it should be as that's what will bring the "a" value into that snippet.

Last edited by Sands; 03-20-2010 at 01:47 AM..
Sands is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote