1 Star 0 Fork 0

Michael夏 / jiuye

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
userinfo.php 2.69 KB
一键复制 编辑 原始数据 按行查看 历史
Michael夏 提交于 2023-01-14 14:06 . new
<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>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/michael010/jiuye.git
git@gitee.com:michael010/jiuye.git
michael010
jiuye
jiuye
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891