emopoops Posted May 17, 2009 Share Posted May 17, 2009 because ive looked at all the tutorials and they dont make sense. im not asking anyone to write the scripot for me im just tying to understand.ive asked numerous forums got no response please helps? the big thing is that i have a registration script that enters the users data into the mysql table before they are verified (the registration script sends them an email with an activation link) i dont want the inverified people to be able to login just because they are already in the database.... u know anyone help me atleast on how to check if they are verfied please??? in the mysql members table is changes a feild to verified from "unverified" when the link is clicked on. help? Quote Link to comment https://forums.phpfreaks.com/topic/158439-solved-login-script-help-me-please-i-have-no-idea-where-to-start/ Share on other sites More sharing options...
Ken2k7 Posted May 17, 2009 Share Posted May 17, 2009 You can have a column in the users table to determine if the user is validated or not. The column should have a value of 0 or 1. So a 0 = not validated, 1 = validated. Then in the login, use something like - SELECT id FROM users WHERE username='$name' AND password='$pass' AND validated=1; Get it? Quote Link to comment https://forums.phpfreaks.com/topic/158439-solved-login-script-help-me-please-i-have-no-idea-where-to-start/#findComment-835576 Share on other sites More sharing options...
GingerRobot Posted May 17, 2009 Share Posted May 17, 2009 Personally i wouldn't do it that way, since you can't distinguish between a non-exist/incorrect user and password and an invalidated account - i'd select the activation column and perform the check in your PHP code. That way you can inform the user if they've not validated. They might have forgotten/not got the email and it'd be confusing if you just tell them their password's incorrect. Quote Link to comment https://forums.phpfreaks.com/topic/158439-solved-login-script-help-me-please-i-have-no-idea-where-to-start/#findComment-835742 Share on other sites More sharing options...
fenway Posted May 19, 2009 Share Posted May 19, 2009 Also, don't ever actually send the password in the query... you can always check this in application code. Especially if you're not hashing your passwords... Quote Link to comment https://forums.phpfreaks.com/topic/158439-solved-login-script-help-me-please-i-have-no-idea-where-to-start/#findComment-837342 Share on other sites More sharing options...
emopoops Posted May 25, 2009 Author Share Posted May 25, 2009 well i did ti that way cause i already had a thing to show if the user is validated. and it works fine i dont understand the post variable thing tho. Quote Link to comment https://forums.phpfreaks.com/topic/158439-solved-login-script-help-me-please-i-have-no-idea-where-to-start/#findComment-841430 Share on other sites More sharing options...
fenway Posted June 1, 2009 Share Posted June 1, 2009 well i did ti that way cause i already had a thing to show if the user is validated. and it works fine i dont understand the post variable thing tho. Say what? Quote Link to comment https://forums.phpfreaks.com/topic/158439-solved-login-script-help-me-please-i-have-no-idea-where-to-start/#findComment-846835 Share on other sites More sharing options...
emopoops Posted November 20, 2009 Author Share Posted November 20, 2009 you know what i mean fenway. Quote Link to comment https://forums.phpfreaks.com/topic/158439-solved-login-script-help-me-please-i-have-no-idea-where-to-start/#findComment-961732 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.