Page 1 of 1

Verify Password Matches Post to Game

Posted: Tue Nov 04, 2014 11:42 pm
by evenmonkeys
I don't even know if this is possible as I've been playing around with this for a couple of weeks.. but I can't get it working.

All I want to do is verify if the player's POSTed "password" matches the password in their game account.

It appears that passwords are entered into the game database using:

Code: Select all

accounts (password)
VALUES (PASSWORD('%s'))
Whatever %s means.. I can't figure that out. Anyways!

What do I need to do to verify that password? The following does not work:

Code: Select all

SELECT * FROM `accounts` WHERE id='$id' && password = PASSWORD($_POST[password])
How do I verify these passwords? -_-

Edit: Figured it out. =\ Spelling error. I've seriously been dealing with this for like 10 days. Gahhhhhh.

Re: Verify Password Matches Post to Game

Posted: Wed Nov 05, 2014 12:36 am
by kjLotus
works fine for me

make sure your syntax is correct and that your string is being built correctly

Re: Verify Password Matches Post to Game

Posted: Wed Nov 05, 2014 11:33 am
by whasf
Make sure you sanitize user input so people can't do injection attacks! Also, don't pass the id and password on the URL :)