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

Problem with PHP/mySQL login code
Hello,

There is an error in my login script and I can't figure out what it is...
I believe

Change log of Cost centre change in Plant maintenance order
Hi,
How to view Change log of Cost centre in Plant maintenance order. Not visible thru 'Docume

get multiple rows
Hi I want to get multiple rows from a db

I am using this for the db query
Code: public

using variables in another page
I have a test database set up on localhost. I have a form that I can type a name into, hit the butto

Spaghetti Code
So.

I've pretty much reached the point where I have so many isset s on one page that I can't

C++ Http request?
Code: string Response = "LOGIN_UNSUCCESSFUL"; System.Net.WebRequest request = Sy

Need help with an email blocker for a guessbook
I am new with php and here is a simple guessbook page but I am being hit with spam from a group of t

Set Categories
I am creating a submission form for somebody to come in and submit products. These products are sep

Passing variables with pagination - iterating through unique id per link
Hi everyone,
I have seen a few topics like this one. Still cant find the specific thing, so I am

Question handling xml data
Hello,

I have sucessfull followed this tutorial
http://www.phpfreaks.com/tutorial/handlin

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