Jump to content
  • Advertisement
Sign in to follow this  
petergood

[TUTORIAL]How to make a register/login/logout system for your game in PHP.

This topic is 2081 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
No password hashing? No SQL sanitizing? No sql prepared statements? Regardless of complexity, safely storing a password is a serious issue, and I strongly encourage that this should be taught from start.

It's not funny when a newcommer follows a tutorial, happens to have moderate success with his first attempts; and then all his user passwords are stolen and all the sql database was destroyed.

It isn't that hard either, specially considering nowadays there is a plug 'n play solution in phppass.
Prepared statements are as easy as normal queries, and they should be preferred when teaching.

Share this post


Link to post
Share on other sites

Also, use parameterized queries to keep searches cleaner and quicker.

 

You don't have to loop through the entire set of rows. Where's the WHERE clause? Build a query which will complete something like "SELECT username, password FROM users WHERE Username = $username AND password = $password"

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!