$m = $_GET[mail]
$i = $_GET[id]
$o = $_SESSION[$m]
$n = $_POST[name]
$p = $_POST[pas]
if($o = $i) {
if($n !== "" or $p !== "") {
$where = "./admin/" . $m . "/" . $p . "/r.txt"
$fso = fopen($where,"w")
if($fso) {
echo"你已注册过此邮箱"
exit
} else {
fwrite($where, $n)
echo"注册成功"
exit
}
} else {
echo"<form action=\"zhuce2.php\"method=\"post\">用户名<input type=\"text\" 首祥厅name=\"name\" /><者隐br>密码 <input type=\"text\" name=\"pas\" /> <input type=\"submit\" /> </form>宴没"
}
}
?>
当闭中然了,如果瞎侍是addbutton,就要改成if ($_POST['update']) {
$name = $_POST["update"]
$query = "UPDATE `chapter` SET `name` = ('$name') WHERE `id` =2"
mysql_query($query)
} elseif ($_POST['addbutton']) {
$name = $_POST['轿神山add']
$query = "insert into `chapter` (name) values ('$name')"
mysql_query($query)
}
你改错位置了
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)