Re: Re: session expires
| From: | Manuel V�zquez Acosta | Date: | Tue, 13 Jan 2004 14:05:20 +0000 |
| Subject: | Re: Re: session expires | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-174444@lists.php.net to get a copy of this message | ||
>"Marek Kilimajer" <kilimajer@webglobe.sk> wrote in message
news:4003FA2E.2080209@webglobe.sk...
>Manuel Vázquez Acosta wrote:
>
>> A tricky way to achive this is:
>> 1. Start the session when the user request the login page
>> 2. Send a hidden field with the PHPSESSID
>> 3. When receiving the post compare the current session id with the
>> submitted by the form, if they match it's likely the session has not
>> expired.
>
>Even if no session file exists for PHPSESSID, PHPSESSID would be used to
>form the name of the session file. So always
>session_id() == $_REQUEST[session_name()]
I didn't mean that: I meant:
if (session_id() ==
$_REQUEST['a_custom_name_for_hidden_field_in_the_large_form'])
....