can someone tell me why mysql_result($)
return me 3 instead of 1 or 0, and if there is a better function to verify if the retrieve function SELECT
return something (if the id exists) and how to store it on a variable. Thank you.
require_once __DIR__ . '/db_connect.php';
$db = new DB_CONNECT();
$select = mysql_query("SELECT `id` FROM `users` WHERE `username`='$username' AND `password`='$password'");
echo mysql_result($select,0);
if (mysql_result($select, 0) == '1'){
echo "True";
}else
echo "False";