Re: Validation and session variables
| From: | Marek Kilimajer | Date: | Wed, 27 Oct 2004 11:28:41 +0000 |
| Subject: | Re: Validation and session variables | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-200422@lists.php.net to get a copy of this message | ||
Stuart Felenstein wrote:
Yes the session variables are set with $SESSION[''}. The way it works is the variable gets set on the follwing pages: So, example on page 1: I have this user input field: <td width="172"><input name="ListingName" type="text" id="ListingName" maxlength="20" /></td> On the following page (page 2): $_SESSION['f1a'] = $_POST['ListingName']; And all the pages follow the same method. Inputs on page 2 are $_SESSION[''] = $_POST['']; on page 3. I did try putting the session_start() at the top of the page. Didn't seem to make any difference.You MUST have session_start() at the beginning of every page that uses session, and if you allow session id to be included in urls you MUST have session_start() in every page.