views:

52

answers:

1

Hi,

i jus friend reference function so i pass the user id through url like below

www.example.com?fid=22

i need to set this as a session or cookie which access to all modules in drupal 6.

if i set session it return for tht particular module . set cookie is not workin at all.

$user->new_property works only on particular page where set if i move to another page no new_property in $user variable object list .

Thanxs in advance, Gobi

+1  A: 

If you want to save a variable in a users session, you can in Drupal (PHP) use the super global varaible $_SESSION.

$_SESSION['fid'] = $_GET['fid'];

The above code is an example of how this could be done.

Since you are getting the info from the URL the user can change it as his whim. So be careful what you use such data for and never trust it blindly. It could become anything, as the user always freely can alter the url any way he want.

googletorp

related questions