View Single Post
Old 11-24-2004, 02:47 AM  
SilverTab
Confirmed User
 
Join Date: Nov 2001
Location: MTL
Posts: 5,060
Quote:
Originally posted by raulph
Quick question, I am trying to make it so that a variable is kept even when the user clicks to another page. For example:

They go to www.yahoo.com?ref=55

and then from yahoo they click news. I want it to then go to:

www.yahoo.com/news?ref55

instead of just going to

www.yahoo.com/news


Hope someone can offer a script for this or an alternative easy to use method.
well let's say you go to
www.url.com/index.php?id=1234

you can print the variable in your page by using <?=$id?>
so just print it in your link...
(let's say you want news.php to carry the variable you would use
PHP Code:
<a href="news.php?id=<?=id?>">
or you can store it in a session variable if you want to carry it around on multiple pages etc etc.....lots of ways to do it..
__________________
mmm my sig was too big... no more cool animation
but hey still! need php? ICQ: 94586959

Last edited by SilverTab; 11-24-2004 at 02:49 AM..
SilverTab is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote