include("webmaster/db.php");
$topImage="ban_register.jpg";
Session_Start();
if($_GET["mode"]=="check"){
$qry = "Select * from first_members WHERE email = '".$_POST["email"]."'";
$checkRS = mysql_query($qry);
if(mysql_num_rows($checkRS)==0){
mysql_query("INSERT into first_members values(NULL,'".$_POST["firstname"]."','".$_POST["lastname"]."','".$_POST["company"]."', '".$_POST["address1"]."','".$_POST["address2"]."','".$_POST["city"]."','".$_POST["state"]."','".$_POST["zip"]."','".$_POST["country"]."','".$_POST["phone"]."','".$_POST["faxnumber"]."','".$_POST["email"]."','".$_POST["password"]."',now(),'D')");
echo mysql_error();
Header("location:thankyou.php");
}else{
$message= "Member with this email exists in our records. If you are existing member, Click here to login";
}
}
?>