bouncdchk Posted October 28, 2009 Share Posted October 28, 2009 I'm not really a php programmer so I'm really struggling with this issue. I have a banner script that is supposed to send people to an affiliate site and pass the parameters along with it. For instance: http://www.mydomain.com/had.php?name=Testbanner&url=http://links.affliatesite.com/?s=bubbly&p=ft&c=1&r=23794&j=13&t=treat&src=ads It doesn't take anything after the &p I know it's something to do with URL encoding but I can't figure it out. Here's what the script coding looks like: <?php require_once "auth/config.php"; $link = @mysql_connect($hostname, $username,$password); if($link) { $dbcon = @mysql_select_db($dbname,$link); } $name = $_GET['name']; $url = $_GET['url']; $rip = $_SERVER['REMOTE_ADDR']; $today = getdate(); //Time of the visit $time = $today['hours'].":".$today['minutes'].":".$today['seconds']; //Date of the Visit $day = $today['year']."-".$today['mon']."-".$today['mday']; $sss = "insert into stats values('$name','$day','$time','$rip')"; @mysql_query($sss,$link); ?> <script language=javascript> document.location.href="<?php echo ($url); ?>"; </script> I could really use some help. I've tried adding urlencde in several variations and places and just can't get it working. Thanks! Link to comment https://forums.phpfreaks.com/topic/179313-problem-with-passing-variables/ Share on other sites More sharing options...
iloveoct Posted October 28, 2009 Share Posted October 28, 2009 IN which php file is this url http://www.mydomain.com/had.php?name=Testbanner&url=http://links.affliatesite.com/?s=bubbly&p=ft&c=1&r=23794&j=13&t=treat&src=ads appear? Link to comment https://forums.phpfreaks.com/topic/179313-problem-with-passing-variables/#findComment-946090 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.