<?php
$id =$_POST[id];
$password =$_POST[password];
$title =$_POST[title];
$name =$_POST[name];
$sql ="select * from member where id='$id' ";
$result=mysql_query($sql) or die(mysql_error());
$num=mysql_num_rows($result);
if($num > 0)
{
die("<script>
alert('รหัสประจำตัวซ้ำ');
history.back();
</script>");
}
$sql ="insert into member(id,password,title,name,profilepic)
values('$id','$password','$title','$name','$filename')";
$result=mysql_query($sql) or die(mysql_error());
redirect('index.php')
?>
ไม่มีความคิดเห็น:
แสดงความคิดเห็น