<?PHP
header("Cache-control: private, no-cache");
if (eregi("[A-Za-z0-9]{6,16}", $HTTP_POST_VARS['password']) AND eregi("[A-Za-z0-9]{6,16}", $HTTP_POST_VARS['username']))
{
$encrypted_password = md5($HTTP_POST_VARS['password']);
$TableName = "userdata";
$Link = mysql_connect("localhost", "root", "krobar");
$Query = "INSERT into $TableName values ('', '$HTTP_POST_VARS[username]', '$encrypted_password')";
mysql_db_query("users", $Query, $Link);
}
else {
print("NO");
}
?>
It performs the DB Query even if more than 16 characters are entered in one of the fields.
I have looked over it several times and cannot find the problem any ideas?