require_once( "include/header.php" );
require_once( "$dir[inc]database.php" );
require_once( "$dir[inc]templ.php" );
$logged[member]=checkauth(1);
TopCode(4);
if ($_POST[reg])
{
if (!$_POST[fname])
$err.="Please enter your first name
";
if (!$_POST[lname])
$err.="Please enter your last name
";
if ((!$_POST[mail]) || (!eregi("^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,4}$", $_POST[mail])))
$err.="Please enter a valid email address
";
if (!$_POST[password])
$err.="Please enter your password
";
if (!$_POST[r1])
$err.="Please choose your age
";
else if ( ($_POST[r1]==2) && !$_POST[rr] )
$err.="Please enter Parent/Guardian Name
";
if (!$err)
{
$res=db_arr("select * from members where email='".$_POST[mail]."'");
if ($res)
$err.="Member with sucn email is already exists. Please choose another one.
";
else
{
mysql_query("insert into members set fname='".$_POST[fname]."',lname='".$_POST[lname]."', email='".$_POST[mail]."', password='".$_POST[password]."', age='$_POST[r1]', parentname='".$_POST[rr]."', regdate=NOW()");
$subject = "Registration Confirmation ";
$headers1 = "From: contact@alpha-school.com\nContent-type: text/html;";
$message="Dear ".$_POST[fname]." ".$_POST[lname]."
Thank you for becoming an Alpha High School student.
We hope you'll successfully pass the Alpha School Equivalency Test and will be entitled to receive the Alpha High School Diploma.
Good luck!
---------------------------
www.alpha-school.com
Registration info
---------------------------
Your first name: ".$_POST[fname]."
Your last name: ".$_POST[lname]."
Use your Email address ($_POST[mail]) as login
Your password: ".$_POST[password]."
---------------------------
Best Regards,
Alpha High School Staff
";
mail($_POST[mail], $subject, $message, $headers1);
echo "";
}
}
}
?>
Take the future in your hands
if ($err)
echo ''.$err.'
';
?>
When you get your High School Diploma in your hands, you get a key to many inviting doors, where you may find wonderful opportunities. Alpha High School wishes you best success in all your efforts.
Receive a "Review Guide" before taking the Test.