Sorry for the nooby question but I am new to php and couldn't find an exact answer to this question.
So anyway, what I want to do is create a php script that displays a captcha notice if a password is incorrectly entered three times. The trouble I am having is with the query I believe, I can't figure out get an integer value directly from the table. Here is my code, any answers would be appreciated :)
$get_login_attempts = "SELECT time FROM login_attempts WHERE email='".mysql_real_escape_string($username)."'";
$run_get_login_attempts = mysql_query($get_login_attempts);
if($run_get_login_attempts == 3){
$captcha = true;
require_once('recaptchalib.php');
$privatekey = "6LcmuvcSAAAAAPsEOXYm_lWWOPaQYLAyUo3HQ91Q";
$resp = recaptcha_check_answer($privatekey,
$_SERVER['REMOTE_ADDR'], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]);
if(!$resp->is_valid)
die("The reCaptcha was not entered correctly, please try again");