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..