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!
Your Answer:
Login to answer
59
24
Other forums
What makes a script your own?
If someone finds a login script online, and changes some variable names around and some other minor
SHOW TABLES Help
Hi all
I have the following
Code: [Select]<?php
$sql = "SHOW TABLES&quo
TabControl Inside ListView Not Editing
Hello everybodyI have a ListView on my page. Inside the ListView I put a TabControl, cuz I want to p
Record count of entire database
Does anyone know if there is a way to obtain the number of records in each table of the database usi
parameter passing issue on function
Well I thought I had created a pretty slick web page, using ?page and $_GET to load pages which wher
Why is my row count 0?
Here's the MySQL query i'm running. It basically pulls data from 2 tables based on some data passed.
send() and recv() parameters confusion
On server Side:
int recv (Socket,Buffer, Length, Flags)
On Client Side:
int send (Soc
Amend code to allow multiple attachments
Hi
I have a php page that allows the user to browse to a file (image) then sumbit, the confi
Clean URLs
Hi I was wandering if anyone has ever implemented URLs on their PHP run website using URLS like wiki
difference between datetimes
($row['totime']-$row['fromtime'])/60
this is giving me 0
example of totime and fromtim