You mean a user gives a username and a password and you need to check in the database if this user is known to the system?
[php]
$username = $_REQUEST[‘username’];
$password = $_REQUEST[‘password’];
$table = ‘users’; // or any name you use for the registered user table
$query = “SELECT * FROM $table WHERE username = ‘$username’ AND password = ‘$password’”;
$result = mysql_query( $query );
if ( mysql_error() )
{ echo "An error has occurred executing query [$query] : ". mysql_error();
}
$login = mysql_fetch_assoc( $result );
if ( $login )
{ // Here you have a succesful match, the user/password combination exists
} else
{ // Here either the username or the password or both are wrong, no match found
}
[/php]
Does this help?
Good luck,
O.