"); if(exists($letters)) { if ($letters != "" && $captcha_no != "" && $image_name != "") { echo("$captcha_no"); $letters = tr($letters,"a-z","A-Z"); if(msqlQuery($sock, "update captcha set letters='$letters' where captcha_no=$captcha_no and image_name = '$image_name'") < 0) { fatal("Error : $ERRMSG\n"); exit(1); } $letters = ""; echo(""); } } else { echo(""); $query = "select captcha_no, image_name, letters from captcha where letters = '' order by image_name"; if (msqlQuery($sock, $query) < 0) { fatal("Error : $ERRMSG\n"); } $res = msqlStoreResult(); $num_rows = msqlNumRows($res); if ($num_rows < 1) { echo("

The characters you typed are incorrect. Please use your browser's back button to go back and correct.

"); } else { $row = msqlFetchRow($res); echo(""); } } msqlFreeResult($res); msqlClose($sock); echo(""); >