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!
Your Answer:
Login to answer
59
24
Other forums
for some reason mysql query not working, not inserting, please check it out
This code is not inserting anything into my db, don't know why, the $_SESSION variable does contain
Javascript using window.location seems to lose state
Not sure what forum so let me know if I'm in the wrong place.
I have a main window with a ajax grid
Character Sets/Collations Stuff
Can someone please give me a check list of things I must do to setup all the charset stuff for my ph
Dynamic memory problem
Hey,
At the beginning of my code, I have this line:
Shape* gShape = 0;
VAT
how should I deal with VAT?
if I have a product that costs £5.00 and VAT @ 17.5% (£0.87
simplexml and xpath - Need some help
Hello,
I am trying to parse an xml which comes back from Amazon and I am trying to know how m
Auto install
Hi I have a directory lets say "apps" that I then have more folders ie "email",
If a form submits back to same page do you need to use $get
IM trying to pass page number and year that was selected back to the same page.
i have this c
If statement help please.
Hello on my site I have 2 content boxes. 1 is for the main content (which is the biggest one) and th
simple php table loop
Hi all,
I've the following code
<?php // Create category options