代码拉取完成,页面将自动刷新
<html>
<meta charset="utf-8"/>
<head>
<title>个人信息修改</title>
<link href="zhuce.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div class="zhuce">
<h1>个人信息修改</h1>
<form action="regist.php" method="post">
<table>
<tr>
<td>
用户名:
</td>
<td>
<input type="text" name="name"/>
</td>
</tr>
<tr>
<td>
真实姓名:
</td>
<td>
<input type="text" name="sname"/>
</td>
</tr>
<tr>
<td>
密码:
</td>
<td>
<input type="password" name="pass"/>
</td>
</tr>
<tr>
<td>
电话:
</td>
<td>
<input type="text" name="tel"/>
</td>
</tr>
<tr>
<td>
班级:
</td>
<td>
<select name="class"><option>class5</option>
<option>class6</option>
<option>class7</option>
</select>
</td>
</tr>
</table>
<button style="width:50;margin:5 auto;">提交</button>
</form>
</div>
<?php
header("Content-Type:text/html;charset=utf-8");
include('db-conn.php');
$user=$_POST['name'];
$pass=$_POST['pass'];
$tel=$_POST['tel'];
$sname=$_POST['sname'];
$class=$_POST['class'];
//$conn=mysqli_connect('localhost','root','root');
$zhuce="update jiuye.user set name=;";
$cha="select * from jiuye.user where name='$user';";
$panduan=mysqli_fetch_assoc(mysqli_query($conn,$cha));
var_dump($panduan[name]);
if ($panduan[name] == $user){
echo "<script>alert('用户名已存在');window.location.href='regist.html';</script>";
}else{
mysqli_query($conn,$zhuce);
echo "<script>alert('创建用户成功');window.location.href='index.html';</script>";
}
mysqli_close($conn);
?>
</body>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。