For my website I’ve created different pages. To access these pages the user needs to log in once. For this secure login I used the script from WikiHow:
www.wikihow.com/Discussion:Create-a-Secure-Login-Script-in-PHP-and-MySQL
When I started everything worked just fine. Somehow, now it doesn’t anymore. The index exists of 2 frames, topFrame and mainFrame. The content’s loaded in the mainFrame, after logging in the users credentials and a logout button appears in the topFrame. The scripts works random. Sometimes I’m able to login, sometimes not. If I’m able to login I stay logged in. But it usually takes a lot of effort to actually log in.
If I enter my credentials for the first time, all data in the topFrame change to my details. So somehow the topFrame seems to see that I’m logged in. mainFrame keeps asking for me to log in. Even if I put a link in the topFrame which I can click after loggin in, to change the page in mainFrame to another page, it doesn’t allow me to see the content.
All pages work just fine if I delete the login script. Also, both top and mainFrame are linked to the same login script.
Does anybody know if this is a common problem and even more important: does anybody know how to fix this? The only modification I made to the original script is the name of the database.