referring page with variables
Posted: Fri Mar 30, 2007 4:50 pm
I have written a calendar script that passes variables in the url to select previous and next months.
eg calendar.php?m=1177968595
To make it embeddable in other scripts I've tried
which is okay the first time
The next time it will append the variables to that url.
The other problem is that it doesn't pass on other variables like say pageid=17
So how do I reliably pick on the referring page and its variables and then put them with the extra variables into a link? Is there a function I have missed or do I need do some serious coding?
eg calendar.php?m=1177968595
To make it embeddable in other scripts I've tried
Code: Select all
$url=$_SERVER['HTTP_REFERER'];
echo "<a href=\"$url?style=blog&m=$previous\">Previous</a>";Code: Select all
index.php?style=blog&m=1177968595Code: Select all
http://localhost/secure/calendar/index.php?m=1173392529&style=blog&pageid=16?style=blog&m=1168294929So how do I reliably pick on the referring page and its variables and then put them with the extra variables into a link? Is there a function I have missed or do I need do some serious coding?