jayLim Posted April 9, 2014 Share Posted April 9, 2014 Hello Forum! I realized something strange, why does my login form gets logged in without for me actually typing in an Email Address and Password, in other words when I leave the form empty and press the login button, for some reason it takes me to index.php welcoming page. The form also logs in when I type some random email address and password, therefore I don't see any error messages whatsoever such as "Please enter a valid email address!". I have no problem with the registration form, changing a new password and logging out. I'm sure all the codes are fine. By the way I am using MAMP to test the pages out. Thanks. J. Link to comment Share on other sites More sharing options...
Larry Posted April 10, 2014 Share Posted April 10, 2014 I would check your cookies or sessions to see what's being sent when. Link to comment Share on other sites More sharing options...
jayLim Posted April 11, 2014 Author Share Posted April 11, 2014 I still get the same result even when I tried it using the original files! It keeps logging me in without email address and password, and no error messages like 'Please enter a valid email address!' or Please enter your password!' Link to comment Share on other sites More sharing options...
Larry Posted April 12, 2014 Share Posted April 12, 2014 Okay, I would check your cookies or sessions to see what's being sent when. To explain more, the idea of being logged in is verified by the existence of a cookie or session, so...if you're logged in without actually logging in, that's your problem. Link to comment Share on other sites More sharing options...
jayLim Posted April 13, 2014 Author Share Posted April 13, 2014 Well, I'm using session, already checked the codes and everything looks fine to me and still no luck. lol. Link to comment Share on other sites More sharing options...
jayLim Posted April 14, 2014 Author Share Posted April 14, 2014 Ok got it! problem fixed, $_SESSION = array(); was missing in index.php thank you! Link to comment Share on other sites More sharing options...
Larry Posted April 14, 2014 Share Posted April 14, 2014 That would do it. That's why I suggested you watch the cookies and sessions. Thanks for letting us know. Link to comment Share on other sites More sharing options...
Recommended Posts