you could connect to the database, then user the query
Code:
$userInfo = mysql_query("SELECT * FROM `users` where `username`='$username'");
then from there, use
Code:
//see if username is in the database
if (!mysql_num_rows($userInfo)) {
//display error message.
echo 'No such user!';
}
else { //if it is in the db, continue
$q = mysql_fetch_array($userInfo);
if ($password != $q[password]) {
//if entered password not equal to pwd in db display error
echo 'wrong password';
}
else { //if pwd is correct, display msg
echo 'You are logged in!';
postblog(); //use postblog function (or any other function)
}
}
Hope this helps!
Bookmarks