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!

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

Adding delete feature to my forum
Hello I am currently trying to add a delete feature to my forum. I believe I have everything built r

Formatting echo from database
So I have a database that stores First and last names, then echos them back to a website, as of now

List/Menu Box
On an edit page when you want something to select what a user has previously selected from the datab

rand() function
just a general question guys a girls, is the rand() function 100% random or is it based on time?

Get value from Select menu
Hi!

Have tried to find the solution on the web. Don't know if there is an easy one. A descrip

Loops and Classes
I am making a template system and everything seems to be going well up until I have to loop in a var

Problems with strings containing
Hey all,

I have encountered something strange in a script. I am trying to write an XML heade

[function.file]: failed to open stream: No such file or directory
Okay I wrote this little script to upload a csv file that is located on my webhosts server to a mysq

Help with forum quoting?
Hi im working on a forum and I have alomost finished it but i want a user quote system like twitter

very easy question about SQL info
Hello,
I think that I have a very easy question.
I know how to create a form using php SQL and

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