Hi guys. Another day another problem.
I wrote a small site for my sister in law.
In it there is an admin section. I haveused the login script from here:
http://evolt.org/php_login_script_with_remember_me_feature (from login.php down)
It works fine on my system running EasyPHP but when uploaded to her server it has the following issue;
Logging in works but often the pages forget the login status. Some pages are fine until a form is submitted (validation within same page) then they logout and some point blank refuse to work and just ask for log in details. All pages were built from the same template and all have the same session start and includes.
My degugging code listing the session vars show $logged_in = 1 when it is working then whe going to a new page it suddenly = 0.
Following the logic the only thing I can think would be causing the issue (remember, this works fine on my local server) is the following:
function displayLogin()
{
[COLOR=seagreen]global $logged_in;[/COLOR]
if($logged_in!="")
{
blah...
Is this not holding the logged_in variable due to globals being off on the server?
Is there a way around this?
It is a server I am not in control of so doing anything to the php.ini is unlikely.
Any help appreciated.