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!

59 Like 24 Dislike
Previous php-forum Next php-forum
Other php-forum

IF Statement & Two Tables With Different Echoes
I'm retrieving two tables in a single query using UNION ALL, like so:

Code: $query = "SE

Generate multilayered array from string.
ok so i have a string that looks like this:
Code: blog:edit_all,delete_all|users:edit_all,delete_

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

header redirect problems? please help
Ok i am making a site that generates youtube thumbnails and i am generating an image that displays 1

Problem in back link
I have page where i have given javascript back link but when i click on it browser give a message

How to limit the calls to an API
Hello, in my simple script I call an api which effectively involves me getting an xml file.

H

Looking for help on using joining mysql tables and php....
Does anyone have any good links to references on how to pull mysql data, through joining tables and

MS Access data into a html table
Hi everyone, I am quite a novice at php but I have created some helpful scripts that fetch data
f

Could Someone Please Debug This?
I was wondering if someone could debug this script for me. I realize it's not the tidest script (and

Little problem with form insertion in MySQL, Please help!!!
Hi!,

I'm a little bit new with php and I have a little issue here. I created a webform to ins

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash