pmiller624 Posted January 6, 2009 Share Posted January 6, 2009 how to i check a username and password using $_GET and if its a true user and pass then it updates a part in mysql Quote Link to comment https://forums.phpfreaks.com/topic/139630-how-do-i-check-login-then-update-mysql/ Share on other sites More sharing options...
Maq Posted January 6, 2009 Share Posted January 6, 2009 $user = $_GET['user']; $pw = $_GET['pw']; //check database to see if they exist and match. then it updates a part in mysql Then you would update a part in mysql... Quote Link to comment https://forums.phpfreaks.com/topic/139630-how-do-i-check-login-then-update-mysql/#findComment-730523 Share on other sites More sharing options...
xtopolis Posted January 6, 2009 Share Posted January 6, 2009 Always sanitize inputs; never store plain passwords. $user = mysql_real_escape_string($_GET['user']); $pw = md5($_GET['pw']); //or your favorite hash Then check that only 1 row exists that has columns matching that username and that password. Quote Link to comment https://forums.phpfreaks.com/topic/139630-how-do-i-check-login-then-update-mysql/#findComment-730541 Share on other sites More sharing options...
Maq Posted January 6, 2009 Share Posted January 6, 2009 how to i check a username and password using $_GET and if its a true user and pass then it updates a part in mysql You need to either provide some sort of code we can work with or be a little more specific. Quote Link to comment https://forums.phpfreaks.com/topic/139630-how-do-i-check-login-then-update-mysql/#findComment-730548 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.