[FX.php List] Session variable problem... code

Bob Patin bob at patin.com
Sun Apr 1 14:57:09 MDT 2007


OOPS!

I bet that's it...

I know better, just got in a hurry...


On Apr 1, 2007, at 2:20 PM, Alex Gates wrote:

> You are using = instead of ==
>
> Try:
>
> if ($_SESSION['xxxx'] == 'y'){
>     echo $_SESSION['xxxx'];
> }else{
>     echo "Okay";
> }
>
>
>
> Bob Patin wrote:
>> So here's the code on the page I'm going to; I restarted my web  
>> server, on the off-chance that it would make a difference, which  
>> it didn't.
>> As a 2nd test, i went to one of my shopping carts and added stuff  
>> to the cart, then closed the browser, and as it should've, it  
>> forgot my cart entries when I returned to the site. However,  
>> everytime I go to the site quoted below, I get the value for the  
>> session variable that I've called "xxxx" below.
>> Since I'm coming from a closed browser, and this is the first page  
>> I've gone to, the IF statement should return "Okay" and not "y" as  
>> it is doing.
>> Any thoughts?
>>  Bob
>> <?php
>> session_start();
>> include_once('FX/FX.php');
>> include_once('FX/server_data.php');
>> if ($_SESSION['xxxx'] = 'y'){
>>     echo $_SESSION['xxxx'];
>> }else{
>>     echo "Okay";
>> }
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list



More information about the FX.php_List mailing list