PHP: Login does not redirect?

First of all $_SERVER"PHP_SELF" is sensitive to XSS, so please escape it.

First of all, $_SERVER"PHP_SELF" is sensitive to XSS, so please escape it. Put a die() statement after your header statement (which should use only absolute URIs, not relative ones like you did).

I now got this working, thank you! :) – Kaizokupuffball Aug 30 at 11:38.

Try changing to this... if ($username == $dbusername && md5($password) == $dbpassword) { //You're in! $_SESSION'username' = $username; header('Location:/user. Php'); exit(); } else die blablabla Also always use exit(); after a header redirect.

That didn't work either. But thx anyways. This is getting frustrating.

– Kaizokupuffball Aug 29 at 20:45.

If the header tag is not working for you, maybe you could try html meta alternative (w3schools.com/html/html_meta.asp) with zero wait time. And if you use this method, don't forget to place link to the page you are redirecting, if the redirection doesn't happen.

Thank you, I will remember that if the header tags is not working. :) – Kaizokupuffball Aug 30 at 11:37.

I've heard Chrome needs header("Status: 200"); Avoid using $_SERVER'PHP_SELF' (security risk) and use SHA256 instead of MD5 (also look into salts). Have you tried checking if the "if condition" are actually met? Also try using a complete url in your header and see if that makes any difference.

Okay, I now have added the SHA256 and will take a look into salts. Thx! – Kaizokupuffball Aug 30 at 11:36.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions