Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


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


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 petergood   Members   -  Reputation: 93

Like
-2Likes
Like

Posted 31 March 2013 - 07:27 AM

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



Sponsor:

#2 Matias Goldberg   Crossbones+   -  Reputation: 3713

Like
2Likes
Like

Posted 31 March 2013 - 08:28 AM

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.

#3 Michael Tanczos   Senior Staff   -  Reputation: 5454

Like
2Likes
Like

Posted 31 March 2013 - 09:02 PM

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



#4 CC Ricers   Members   -  Reputation: 802

Like
1Likes
Like

Posted 31 March 2013 - 11:53 PM

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"


My development blog: Electronic Meteor




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS