mohammadashrafulislam-chisty/panda-php-session-auth ? reverse-engineered prompt

Reverse engineered prompt

Build me a simple PHP login system with session based authentication.

I want a basic site with a register page, a login page, a protected dashboard, and a logout action. New users should be able to create an account, log in, stay logged in with a session, and get sent back to the login page if they try to open the dashboard without being authenticated.

Keep it lightweight and straightforward, using plain PHP and whatever simple file structure makes sense for those pages. Make the landing page clean and easy to understand, with clear links to register, log in, dashboard, and log out where appropriate. After login, show a friendly dashboard message and a way to sign out.

Please make the whole thing work end to end so I can run it locally and test the flow right away. If you need to check current best practices or syntax details, look up the current docs online first.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab