Problem with passing variables
Posted on
16th Feb 2014 07:03 pm by
admin
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!
Your Answer:
Login to answer
59 24
Other forums
Extract specific information from a PHP Multidimensional Array
Howdy! I've racked my brain over this for 24 hours now. I think it's time I asked for help. I'm lear
Undefined variables
hi
----------------------------------------------------------------------------------------------
problem getting my contact form working
Yeah I know this is a pretty basic problem, but it's been a while since I've worked with PHP and I'm
SCO Unix
I know this might not be the place to ask, but, can anyone tell me if SCO Unix comes with PHP built
PHP Upload issue
Hi guys,
I have stumble across an interesting issue with my script and is doing my head in.
ldap connection
We are using ldap to get user information from the domain controller. It was working before. Recentl
php email checker
I am having alot of trouble finding info on how to do these email things. I need to do the following
Using insert variable
need a way to inert variable data to mysql database
$acc = "212121212";
$nok =
PHP File Upload Problem
Hi, I have written a very simple file upload script but it fails for reasons I can't explain. Hope
dynamic table with forms
I have a table that is populated with mysql data and in teh first column there is a raido button tha