From 6a499770d3c7299a8d59c1340e5d2f7463f59150 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=AE=B6=E7=8E=B2?= <1851699117@qq.com> Date: Sun, 5 Jun 2022 16:01:58 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...46\211\213\344\275\234\344\270\232.md.txt" | 220 ++++++++++++++++++ 1 file changed, 220 insertions(+) create mode 100644 "\346\235\216\345\256\266\347\216\262/20220601-\347\211\265\346\211\213\344\275\234\344\270\232.md.txt" diff --git "a/\346\235\216\345\256\266\347\216\262/20220601-\347\211\265\346\211\213\344\275\234\344\270\232.md.txt" "b/\346\235\216\345\256\266\347\216\262/20220601-\347\211\265\346\211\213\344\275\234\344\270\232.md.txt" new file mode 100644 index 0000000..4bf2ca1 --- /dev/null +++ "b/\346\235\216\345\256\266\347\216\262/20220601-\347\211\265\346\211\213\344\275\234\344\270\232.md.txt" @@ -0,0 +1,220 @@ +```php +index.php + + + + + + 用户登录 + + + + + +

用户登录

+
+ + + + + + + + + + + + + + +
用户名:
密码:
再次密码:
性别:
年龄:
身高:
爱好: + 运动 + 音乐 + 电影 + 旅游 + 美食 + 游戏 + 吃饭 +
手机号码:
住址:
交友宣言:
上传头像:
+ +
+ + + + + +register_do.php + + $value){ + if($key!='提交'){ + $$key=$value; + } + +} +$hobby = implode(',',$hobby); +// 开始使用mysql /1 连接服务器 +include_once ('./conn.php'); + +// 编写SQL语句 注册其实是往数据库表里新增数据 insert +$sql = "insert into `user` values ('$username','$password','$sex','$age','$height','$hobby','$phone','$address','$aboutme',null)"; +//echo $sql; +// 执行上面的SQL语句 +$result = mysqli_query($conn,$sql); +// 判断 +if($result){ + echo "注册成功。请登录!"; +}else{ + die("注册失败。".mysqli_error($conn)); +} + + + + + + + + + 用户登录 + + +

用户登录

+
+ + + + +
用户名:
密码:
+
+ + + + + +login.php + +重新登录!"); + } + + echo "登录成功!返回主页"; + + } +?> + + + + +conn.php + + Date: Sun, 5 Jun 2022 16:02:10 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=E9=87=8D=E5=91=BD=E5=90=8D=20=E6=9D=8E?= =?UTF-8?q?=E5=AE=B6=E7=8E=B2/20220601-=E7=89=B5=E6=89=8B=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A.md.txt=20=E4=B8=BA=20=E6=9D=8E=E5=AE=B6=E7=8E=B2/2022?= =?UTF-8?q?0601-=E7=89=B5=E6=89=8B=E4=BD=9C=E4=B8=9A.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20220601-\347\211\265\346\211\213\344\275\234\344\270\232.md" | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename "\346\235\216\345\256\266\347\216\262/20220601-\347\211\265\346\211\213\344\275\234\344\270\232.md.txt" => "\346\235\216\345\256\266\347\216\262/20220601-\347\211\265\346\211\213\344\275\234\344\270\232.md" (100%) diff --git "a/\346\235\216\345\256\266\347\216\262/20220601-\347\211\265\346\211\213\344\275\234\344\270\232.md.txt" "b/\346\235\216\345\256\266\347\216\262/20220601-\347\211\265\346\211\213\344\275\234\344\270\232.md" similarity index 100% rename from "\346\235\216\345\256\266\347\216\262/20220601-\347\211\265\346\211\213\344\275\234\344\270\232.md.txt" rename to "\346\235\216\345\256\266\347\216\262/20220601-\347\211\265\346\211\213\344\275\234\344\270\232.md" -- Gitee