switch($do){
case "update":
$sql="UPDATE user SET user.name='$name', user.pass='$pass', address='$address' WHERE user.id='$id'";
$query=mysql_query($sql);
break;
case "register":
$ip=@$REMOTE_ADDR;
$datetime = date('Y-m-d H:i:s');
if($user=="" or $pass=="" or $email=="")
{
echo"Please fill \n";
echo "<a href=javascript:history.back(); >Back Register</a><br>";
exit();
}else{
//เพิ่มข้อมูลฐานข้อมูล
$sql="insert into user (user, pass, email, ip, date_regis)VALUES ('$user','$pass','$email','$ip','$datetime') ";
$query=mysql_query($sql);
echo"<script language=\"JavaScript\">";
echo"alert('Complet Add Data')";
echo"</script>";
}
break;
case "delete":
$sql="delete * form user where id="$id"";
$query=mysql_query($sql);
}