Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
4 - 1 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
   

Re: adding a session variable
by trabis on 2009/1/8 23:08:09

open common.php and paste $_SESSION['un'] = $_REQUEST['un']; right before ?>

Then you can get use $var=$_SESSION['un']; in any page that calls mainfile.php (this covers almost every page, lol)

Re: adding a session variable
by tayling on 2009/1/8 23:01:14

thanks trabis
sounds good but i cant see how to do that - can you give me an example? am using ver 2.0.18.1 byt the way
Thanks
TOny
Re: adding a session variable
by trabis on 2009/1/8 22:55:43

Quote:

and in index.php
$_SESSION['un'] = $_REQUEST['un']


Why using that in index?
You should use it in include/common.php so it can be accessed in other pages.
Re: adding a session variable
by trabis on 2009/1/8 22:52:19

...
Re: adding a session variable
by tayling on 2009/1/8 22:46:33

I have now tried
domainname.com/xoops/index.php?un=1234

and in index.php
$_SESSION['un'] = $_REQUEST['un']

but this does not carry into the session
any ideas?
Cheers
Tony

Who's Online

505 user(s) are online (451 user(s) are browsing Support Forums)


Members: 0


Guests: 505


more...

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits