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

Pop-up Banner
Hello Friends,I need to use banner in our client site.Example: www.example.com if i enter this site

unexpected T_VARIABLE error
Hey all! I'm getting an unexpected T_VARIABLE with the following function:

function getHighes

Creating an invoice
Using fpdf I am trying to create an invoice to send to clients. The products are sold in pricing tie

Concatenate two strings ???
I have string one $string1 and another $string2.

How to concatenate (add) both of them $str

Deleting a record php
Attempting to setup delete a record page. The below code I put together doesn't seem to work.

Form errors in an array
I'm processing a form and putting the errors in an array. empty($errors) doesn't seem to do the tric

Can't get the unicode character
I'm trying to get some text from various parts of a file. I have converted the file to hex (bin2hex)

Image upload - determine folder
I have an upload script that may be accessed from different directories. Problem is, the script is m

Click counter to ignore traffic from search bots
I have a click counter on my site that...well, counts the number of clicks a link gets on the frontp

turning an array into a string then poping it into a db
Hi im just wondering how you get a requested array into a single string then pop it into the db so f

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