"your e-mail",
"captcha" => "Security Code"); //you can enter more field as required
foreach($required as $field => $label) {
if (!$_POST[$field]) {
$warnings[$field]= " * Required";
}
}
$raw_captcha = $_POST[captcha];
if(!ctype_alnum($raw_captcha) or ($_SESSION["captcha"] != $_POST["captcha"]))
$warnings["captcha"]= "* enter 4 yellow letters above
";
if (empty($_POST["user_email"]) )
{$warnings["user_email"]= "* to send your password to ";}
if($_POST["user_email"] &&
!ereg("^[^@]+@([a-z0-9\-]+\.)+[a-z]{2,4}$", $_POST["user_email"]))
{$warnings["user_email"]= "* invalid email";}
if($_POST[user_email])
{
$_SESSION[clean_email] = false;
$raw_email = $_POST[user_email];
$email_clean = mysql_real_escape_string(strip_tags(trim($_POST[user_email])));
$clean_email = $_POST[user_email];
$_SESSION[clean_email] = $clean_email;
}
//end of test email
?>