plus_signup is the table name, userid and password are the field names. This SQL statement will return us one record if member userid and password is there in our table. So we can use one if condition to process the script if the usrid and password is correct and is there in the table.
"SELECT * FROM plus_signup WHERE userid='$userid' AND password = '$password'"
Now let us check the database with our query.
Here is the code to do all this for us.
$count=$dbo->prepare("select password,mem_id,userid from plus_signup where userid=:userid");
In the above code if the validation is correct then we are creating session variables
The else condition if userid or password is not correct will display the message and ask the member to try again.
|have tried d above codes and they are all working fine. great job. but how can i redirect different users to different pages customized for only each user. thanks|
|thank you for the tutorial , your site is great, and really helping me understand. Thanks!|
|Hello Guys,,, i need some help, am new to PHP world But was told to create a login from with default password/username,and a registration form, after loggingin using the default password and username, then you can register your details,,,,it is then stored to the database.|
|i have query that ones user login after log out then user can not again with url login|
|hello, i need help, i forget that how to edit text in textarea using php|
|ok..thanks you for ur guidelines|
|can someone help me always login error is come e.g|
404 - Page Not Found
Sorry, the page you are looking for does not exist
|What is the page name you are seeing at the top on address bar ? That page should be there. After login there is a welcome page , check that you just placed that page.|