I almost finished my login script, but I do not know how to verify the username and password. Here are my script files.
The index.php file is just a page that I use to collect information from my users for registration.
action1.php:
<?php $con = mysql_connect("localhost", "root", ""); if (!$con) { die ('Could not connect: ' . mysql_error()); } mysql_select_db("user1", $con); $sql="INSERT INTO useri1 (uname, pword) VALUES ('$_POST[uname]','$_POST[pword]')"; if (!mysql_query($sql, $con)) { die('Error: ' . mysql_error()); } echo "1 record added"; mysql_close($con); ?>
The action1.php file is only a page that registers users in the database.
The login.php file is just the page that I use so that users enter their login information.
Now this is my problem, I have no idea how to check the registration information for users so that they can go to the area for members only. I am new and any help is much appreciated.
Thanks,
- Devin
source share