![]() |
PHP Question = Keeping a Variable
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. |
PHP Code:
the above code is good for only two |
Thanks, but I don't think this solves the problem on keeping the variable stored so I can use it on the next page. I am testing out some cookie functions now, I think that is what I needed.
|
Quote:
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:
|
Quote:
|
PHP Code:
|
after you drop the cookie,
PHP Code:
|
PHP Code:
|
[QUOTE]Originally posted by raulph
[B] PHP Code:
Thanks again guys! |
Try using smarty (smarty.php.net), they have something like $smarty -> assign;
|
Quote:
that's like stepping into a fomula 1 car and asking how to step on the gas. |
All times are GMT -7. The time now is 07:07 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123