I'm predicting, based on a number of pages I've read about sessions, that the session data will be lost when moving to a new page here:

Quote:

// redirect user to the list page
header("Location: index.php");



Am I wrong?

The issue I was presented with was that I needed to show intermediate content after the person types in their user ID, not jump immediately to a hidden download. Without that necessity I could replace that header with the full header from the first example to send the file.

The flow is like this...

Form page (remail.php) with email_address input -> submits back to itself
Form page (remail.php) calls different script to validate input address against DB and send an email, fail shows an error message and pass shows a success message along with a download button image.

At this point user can leave or optionally click to download using his validated address as the authentication criteria for the download.

I do have session variables used elsewhere on my site (shopping cart), but I started with some skeleton code for that and never dug deep into the mechanics of the session stuff. In that implementation the session data gets written to a session file on the server (it's used to hold the cart contents).

I've also read advice not to use session_register but instead to use the $_SESSION array. Example: $_SESSION["userid"] = $user; Not sure if it's as simple as a direct replacement though.
_________________________
Bruno
Twisted Melon : Fine Mac OS Software