Hi, I'm building a php jump script, but since I dont know php at all, I'm not being able to make it work properly. I alrealdy solve some "unexpected error" here and there reading some forums, but this one error im not being able to solve :queasy: . Can someone have a look, to see whats going roong?
Thes script its actually working (but not correclty) but all my links are redirecting to my home page insted of the proper link. I used the php jump script tutorial from this site:
http://www.stevedawson.com/article0006.php
Here is my code ( I changed the links and make the script a lot smaller since its working and i think the problem its on the second line):
<?php
if ($m == "") {$link = "http://www.affiliatewebsitehere.com";} // start
if ($m == "google") {$link = "http://www.google.com";}
if ($m == "yahoo") {$link = "http://www.yahoo.com";}
if ($m == "msn") {$link = "www.msn.com";}
header("Location: $link"); // go to selected affiliate link
exit()
?>
Then on my site I create the links with
<a href="jump.php?m=google">Go to Google</a>
but the links all go to the home page of the site, as if it were only folowing the
if ($m == "") {$link = "http://www.affiliatewebsitehere.com";}
line of code.
Any advice?
Thanks a lot, best regards.