Skip to main content
GameDev.net gamedev.net
🔒 Locked

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

Started by petergood Mar 31, 2013 at 1:27 PM 2 replies 2.4k views
Original Post
petergood
petergood

Hello.

A user just made this amazing tutorial. I just thought I would share it with you guys. http://php-gaming.co...ur-game-in-php/

Hope you enjoy reading it. Sorry that it is on a different site, but I dont want to copy his work biggrin.png

Matias Goldberg
Matias Goldberg
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.
Michael Tanczos
Michael Tanczos

Holy hell.. you need to take down that tutorial or at least put a warning that nobody should ever, ever, ever use that.

CC Ricers
CC Ricers

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"

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.