<?php
if(isset($_POST["action"])&&($_POST["action"]=="join")){
$query_RecFindUser = "SELECT `acout` FROM `l` WHERE `acout`='".$_POST["textfield"]."'";
$RecFindUser=mysql_query($query_RecFindUser);
if (mysql_num_rows($RecFindUser)>0){
?>
<script language="javascript">
alert("已經有人使用過此帳號");
window.location.href='join.php';
</script>
<?php
//header("Location: Join.php?errMsg=1&username=".$_POST["textfield"]);
}else{
$query_insert = "INSERT INTO `l`
(`acout`,`num`,`name`, `phone`, `mail`, `address`)
VALUES (";
$query_insert .= "'".$_POST["textfield"]."',";
$query_insert .= "'".$_POST["textfield2"]."',";
$query_insert .= "'".$_POST["textfield3"]."',";
$query_insert .= "'".$_POST["textfield4"]."',";
$query_insert .= "'".$_POST["textfield5"]."',";
$query_insert .= "'".$_POST["textfield6"]."')";
mysql_query($query_insert);
?>
<script language="javascript">
alert("恭喜你成功\n請再一次登入。");
window.location.href='index.php';
</script>
<?php // 跳出視窗用
}
}
?>
留言列表