if ($name_reg==""or $last_reg==""or $user_reg==""or $pass_reg==""or $address_reg==""or $email_reg==""){
echo"กรุณากรอกข้อมูลให้ครบด้วยค่ะ";//exit();
}
include"function.php";
if (!checkemail($email_reg)){
echo"รูปแบบอีเมลล์ไม่ถูกต้องค่ะ";exit();
}
include"connect.php";
$sql="select * from member where username='$user_reg' ";
$result=mysql_db_query($dbname,$sql);
$num=mysql_num_rows($result);
if($num>0){
echo"username ของคุณซ้ำค่ะกรุณาเลือกusernameอื่น";exit();
}
$sql="insert into member values(
'','$name_reg','$lastname_reg','$user_reg','$pass_reg','$address_reg','$tel_reg','$email_reg','$date_reg')";