Just to answer the question, make a mysql database (or use an existing one) and put a table in it that has username and password.
the code is
$conn = mysql_connect('mysql','username','password');
$db = mysql_select_db('databasename');
$username = $_POST['username'];
$password = $_POST['password'];
if($password != '' && $username != '')
{
$query = "select * from TABLENAME where username = '$username' and password = '$password'";
$result = mysql_query("$query");
$num = mysql_num_rows("$result");
if($num == 1)
{
whatever you want it to do such as header("location:file");
}
}
else
{
echo "";
}
?>
note where I put text|password you need to choose one.
|