$query_rscheckmem = "SELECT * FROM member where Member_User='$U_Name'";
$rscheckmem = mysql_query($query_rscheckmem, $connect) or die(mysql_error());
$row_rscheckmem = mysql_fetch_assoc($rscheckmem);
$totalRows_rscheckmem = mysql_num_rows($rscheckmem);
if($U_Name<>""or $P_Name<>"" or $ConfirmPassword<>"" or $P_Name<>"" or $Firstname<>"" or $Email<>"" or $IDCard<>"" or $IssueDate<>""or $Address<>""or $ZipCode<>"" or $Telephone<>"" or $Mobile<>""){
if($totalRows_rscheckmem>0){
echo"<script language='javascript'>alert('Username นี้มีผู้อื่นใช้แล้ว '); </script>";
}else{
add_db(member,array("Member_User"=>"$_POST[U_Name]","Member_Pass"=>"$_POST[P_Name]", "Member_Pre"=>"$_POST[Prefix]","Member_Name"=>"$_POST[Firstname]", "Member_Email"=>"$_POST[Email]","Member_IDCard"=>"$_POST[IDCard]", "Member_Date_IDCard"=>"$_POST[IssueDate]","Member_Address"=>"$_POST[Address]", "Member_Provice"=>"$_POST[ProvinceID]","Member_Zipcode"=>"$_POST[ZipCode]", "Member_Telephone"=>"$_POST[Telephone]","Member_Mobile"=>"$_POST[Mobile]", "Member_Fax"=>"$_POST[Fax]","Member_Status"=>"1","Member_Permission"=>"No"));
}
}