procedural/crud_mysql/database/database_admin.php
# Returns true if the user exists in the database, false otherwise.
Returns true if the user exists in the database, false otherwise.
Returns true if the user exists in the database false otherwise .
function check_login($connection, $name, $pass)
{
	global $usersTable;
	$sql = "SELECT * FROM {$usersTable} WHERE username = '{$name}' AND password = '{$pass}';";
	$res = mysqli_query($connection, $sql);
	if ($res == false) return null;
	return mysqli_fetch_assoc($res);
}
function check_login ( $ connection , $ name , $ pass ) { global $ usersTable ; $ sql = " SELECT * FROM  { $ usersTable }  WHERE username = ' { $ name } ' AND password = ' { $ pass } '; " ; $ res = mysqli_query ( $ connection , $ sql ) ; if ( $ res == false ) return null ; return mysqli_fetch_assoc ( $ res ) ; }
Returns true if the user exists in the database, false otherwise.
Returns true if the user exists in the database false otherwise .