Jump to content

[SOLVED] login script help me please i have no idea where to start!


Recommended Posts

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?

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?

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.

  • 5 months later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.