mariofont / PHP-Login

Simple, easy-to-use, and database-free login system.
48 stars 33 forks source link

Redirect from login.php failing #4

Open danvanbueren opened 4 years ago

danvanbueren commented 4 years ago

Disclaimer - I am not very experienced with PHP so forgive me if I am confused.

I found an issue where header("location:index.php"); hung, or failed. I did some basic research on how the header() function works but I still don't understand it well enough to tie into here.

Anyway, I found a solution that worked - adding ob_start(); at the top of the php script in login.php seemed to fix it. I don't understand output buffers much either, but seeing as it is now working, that's what I'm sticking with until somebody has a better idea.

Regardless, I am posting this here because it did not work out of the box, and I hope to help out the next guy and keep him from spending hours trying to figure out why this isn't working.

cherrypj commented 4 years ago

This worked for me, as well. Thank you @danvanbueren