Hi Guys,
I need your help please. I’m trying to load a URL like the following:
http://www.xxxxx.com/track/clickbeta.php?p=3&affid=21&subid=testurl&lp=1
Now as you can see in the url i have the following:
&lp=1
Here is my code:
//XXX LP - XXX UK
if ( $lp == "1" ) {
$url="xxxxxxxxxxxxxxx.com";
};
//XXX LP - XXX UK
if ( $lp == "2" ) {
$url="xxxxxxxxxxxxxxxxxx.com";
};
if (isset($lp)) {
//do nothing
} else {
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Oops theres an error, our highly trained monkeys have been notified.");
$query = sprintf("SELECT URL FROM programs WHERE ID ='%s'",
quote_smart($p));
mysql_query($query) or dies(mysql_error());
$result = mysql_query($query);
$url=mysql_fetch_array($result, MYSQL_ASSOC);
mysql_close();
};
$string =$url['URL'];
$string = addslashes($string);
$urlgo=eval("\\$string = \\"$string\\";");
header( 'Location: '.$string.'' ) ;
There is more code than the above such as connecting the the database and variable setting but i the i think with the above you can see what im trying to do. But how ever when i try the URL above with the &lp=1 it just takes me to:
http://www.xxxxxxxxxxx.com/track/h
and not the URL thats in the script. Can someone help me please and tell me where im going wrong?
Thank you.