PHP Login System

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: PHP Login System

Post by Celauran »

It should, except you've overwritten $_SESSION['id'] with an uninitialized variable two lines above. I have also added a redirect for users not logged in. Most importantly, having this code will allow you to remove the check against $_GET['id'] farther down the page.
Post Reply