17 May
2006
17 May
'06
12:04 a.m.
* and then Khalid B declared....
Use session data.
To store something use:
$_SESSION['foo'] = $bar;
To get it back use:
$baz = $_SESSION['foo'];
That is it.
Thanks.
Will the data not be lost when the browser is closed?
The browser has a cookie with an ID that corresponds to a row in the sessions table, which is where $bar is stored. If the user has the browser set to erase cookies when the browser closes, then the answer to your question is yes, because Drupal cannot associate the row without the ID stored in the cookie. Else no.