RE: PHP Sessions?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



rory walsh <mailto:rorywalsh@xxxxxx>
    on Wednesday, March 02, 2005 2:08 PM said:

> Thanks everyone, I'm getting closer. The only problem I have not is
> that I keep entering that test, I modified it to change the session
> variable once we enter the test but it somehow does not seem to
> change it? This is the code,

Immediately I see:

> if(strlen($_SESSION['loggedin']=="yes")){

That doesn't make sense. Do you mean?:

if($_SESSION['loggedin'] == "yes") {

And the next line:

> $_SESSION['loggedin']="no";

Why are you reversing the value of 'loggedin'? Once the person is logged
in shouldn't they stay that way until session timeout or they log out?

> When I click the logout button it works fine, but when I click on the
> link inside the page it simply reloads the same page as if the session
> variable has not changed at all? If I link to a page like this does it
> call the script again, or does this need to be done with a form
> submit? I must apologise for my lack of knowledge here! I program in
> other languages and as a result I have that I can get really deep in
> code I don't understand very fast!

Maybe you've already stated this in a previous email and I just don't
remember, what exactly is it that you're trying to accomplish?



Chris.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux