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.

Did you know?Explore Trending and Topic pages for more stories like this.
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!
Posted on 18th Aug, 2021
Nettie Cox
Download the best ringtones at http://klingeltonmobi.de

Your Answer:

Login to answer
59 Like 24 Dislike
Previous forums Next forums
Other forums

Page Reload
I am having issues getting a page to reload after I submit data to a database. This form should inp

need help with date function
i have following form for date

Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01

uploading video files into mysql in php
hi,
I have the video files which i have to upload into mysql db. along with creating thumbnails f

Change image filetype on upload?
Hi,
I've got a form which uploads an image to the server.
Is it possible to change the image t

How do I get the row number from from an sql table query
Hi all

I have a table that I query and it returns a number of rows.
mysql_num_rows($query)

strptime() equivalent for php4 ?!
Greetings!

this is my first post, thank you in advance for your replies.

Well, the ti

Posting Serialized Data Not Working
I am trying to send an object from one PHP file to another using POST. I serialize the object and th

Mysql error message
help me find out what this error message means:

"Duplicate entry '0' for key 'PRIMARY'&q

CU&UC guide
Hi Gurus,

can anybody provide me the link for CU&UC upgrade guide

Thanks i

LIMIT $start, 10... how to pass last value queried into next page with GET??
Ok I know how to display the first or last 10 results of a query...

$result = mysql_query(&q

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