GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   PHP Jump Script not working (https://gfy.com/showthread.php?t=959337)

moeloubani 03-20-2010 01:29 AM

PHP Jump Script not working
 
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();
?>


Sands 03-20-2010 01:43 AM

Quote:

Originally Posted by moeloubani (Post 16962401)
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.

moeloubani 03-20-2010 02:26 AM

thanks homie!! :)


All times are GMT -7. The time now is 03:24 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123