Login page is not working properly while using PDO prepared statement in php

What does happen? Do you get an error message, now you have error-reporting on as noted above?

Why do you have a header redirect prior to your include?

removed the header part you mentioned. that was a mistake.

I am used to seeing a space after location:

header("Location: admin.php"); exit();

Not sure if it will make a difference and too lazy to test. Probably won’t help. Can’t help but wonder if admin.php is not itself redirecting back to your login page.

OK, so what’s happening with the script? How far does it get through, and what does it do instead of the redirect?

Good point there, what is this script called, and could admin.php be coming right back?

Also, not a good idea to store the password in session variables, even hashed. There’s no real need for it.

Can you also post the login form please?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.