View Full Version : How do I add a session variable?
bigtime
09-24-2002, 02:46 AM
Hello,
How do I add a session variable?
I'm sending users to the following url:
http://www.mydomain.com/forums/index.php?ref=abcdef
I need to add a session variable for "$ref" so that the value will follow the user around the forum.
Thanks in advance!
JulianD
09-25-2002, 03:56 AM
You can pass variables using GET or POST methods. When you pass a variable using somehting like index.php?foo=1, then you can get the value using something like:
$foo = $_GET['foo'];
If you use POST methods (ie. in a form), then you must use something like this:
$foo = $_POST['foo'];
just open misc.php and add a new action there. that new action will point with a $goto to your new url.
simple and efficient.
bigtime
09-25-2002, 04:50 PM
Thanks for the replies.
What I need to do is set the value to a session variable. I don't think either solution does that.
Any other ideas?
Thanks.
zero477
12-09-2014, 09:34 PM
Thanks for the replies.
What I need to do is set the value to a session variable. I don't think either solution does that.
Any other ideas?
Thanks.
Have you solved this?
ozzy47
12-09-2014, 09:38 PM
You would be best to start your own thread in the appropriate forum, and give as much information as possible, as this thread is twelve years old. :)
TheLastSuperman
12-09-2014, 09:47 PM
Have you solved this?
See Ozzys reply below, I'm still curious as to why YOU want to do something like this and until you start a new thread and explain we can't be of much help.
You would be best to start your own thread in the appropriate forum, and give as much information as possible, as this thread is twelve years old. :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.