Send variable to the user profile in Drupal 6
PHP is a "shared-nothing" architecture, nothing persists over multiple requests unless stored externally.

So you really only have two options:


Sessions. Drupal already maintains a session for you for every user (also anon users, except on the first request). So just add your data to $_SESSION['yourmodule']['yourdata'] and you have it available on the next request where you can remove it again if you want.
GET. Alternatively, you can also pass the data forward through the GET request, by doing the redirect like this: $form_state['redirect'] = array('user/' . $account-&gt;uid, array('key' =&gt; 'value')). As in my example, you should always use the internal URL when doing a redirect, Drupal will take care of the aliasing fory you.