I am trying to select data from a MySQL table, but I get one of the following error messages:
mysql_fetch_array() expects parameter 1 to be resource,
Check your connection first.
Then if you want to fetch the exact value from the database then you should write:
$username = $_POST['username'];
$password = $_POST['password'];
$result = mysql_query("SELECT * FROM Users WHERE UserName =`$usernam`");
Or you want to fetch the LIKE
type of value then you should write:
$result = mysql_query("SELECT * FROM Users WHERE UserName LIKE '%$username%'");