title: How to set a value into a cookie or session in Drupal
body: <p>I am working on a friend reference function, so I pass the user id through the url like this: </p>
  
  <p><code>www.example.com?fid=22</code></p>
  
  <p>I need to set this as a session or cookie with access to all modules in Drupal 6.</p>
  
  <p>If i set the session it returns for the particular module. Setting the cookie is not working at all.</p>
  
  <p>$user->new_property works only on the particular page where it is set, if I move to another page there is no new_property in $user variable object list.</p>