RE: [PHP-WIN] Session troubles
| From: | Ron dot Herhuth at tatumpartners dot com | Date: | Mon, 17 May 2004 14:42:54 +0000 |
| Subject: | RE: [PHP-WIN] Session troubles | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-23740@lists.php.net to get a copy of this message | ||
THAT DID THE TRICK!!!!
Excellent...thanks Charles!
>From: Charles P. Killmer
>To: php-windows@lists.php.net
>Sent: 05/17/2004 10:39 AM
>When you use the header function, you must include the SID. There are
>numerous ways to do this but the way that I use is like this.
>
>session_start();
>$row['id']=545;
>
>$_SESSION['individual_id'] = $row['id'];
>header("location:dataFilterExpander.php?".sid);
>
>Charles Killmer
>
>-----Original Message-----
>From: Cory D. Wiles [mailto:cwiles@eperformax.com]
>Sent: Monday, May 17, 2004 9:40 AM
>To: Ron.Herhuth@tatumpartners.com
>Cc: php-windows@lists.php.net
>Subject: Re: [PHP-WIN] Session troubles
>
>Though i can not verify this at the moment. I had a similar problem, but
>not with sessions and the notice steams from not having a var declared.
> To get rid of the error you have to turn e_notice off.
>
>Something like this:
>error_reporting = E_ALL & ~E_NOTICE
>
>Here is a good explanation of what was happening.
>
>http://www.webmasterworld.com/forum88/3494.htm
>
>-Cory
>
>Ron.Herhuth@tatumpartners.com wrote:
>
>> For some reason I am not able to get sessions to work.
>> This is the code I have entered on the first page:
>>
>> session_start();
>> $row['id']=545;
>>
>> $_SESSION['individual_id'] = $row['id'];
>> header("location:dataFilterExpander.php");
>>
>>
>>
>> On page two this is the code I'm using:
>>
>> session_start();
>>
>> if(empty($_SESSION['individual_id']))
>> {
>> header("location:dataLogin.php?status=nosession");
>> }
>>
>>
>> On the second page I get the error:
>> Notice: Undefined index: individual_id in...
>>
>> I have the appropriate permissions set, and I have Reg Globals turned
>> on and sessions enabled in the ini...why oh why is it not working??
>>
>> Thanks for any help you might be able to provide.
>> Ron
>>
>>
>>
>>
>>
>>
>>
>
>--
>PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit:
>http://www.php.net/unsub.php
>
>--
>PHP Windows Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>