From eb9484550be2e836889b1091fc92308a45a6db75 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=B1=A4=E4=BA=A6=E5=87=A1?= <1044020597@qq.com>
Date: Sun, 5 Jun 2022 13:30:27 +0000
Subject: [PATCH 1/2] a
---
...P\347\211\265\346\211\213\347\275\221.txt" | 297 ++++++++++++++++++
1 file changed, 297 insertions(+)
create mode 100644 "\346\261\244\344\272\246\345\207\241/20220605-PHP\347\211\265\346\211\213\347\275\221.txt"
diff --git "a/\346\261\244\344\272\246\345\207\241/20220605-PHP\347\211\265\346\211\213\347\275\221.txt" "b/\346\261\244\344\272\246\345\207\241/20220605-PHP\347\211\265\346\211\213\347\275\221.txt"
new file mode 100644
index 0000000..78f85ae
--- /dev/null
+++ "b/\346\261\244\344\272\246\345\207\241/20220605-PHP\347\211\265\346\211\213\347\275\221.txt"
@@ -0,0 +1,297 @@
+```mysql
+CREATE DATABASE qianshou charset utf8;
+use qianshou;
+DROP TABLE IF EXISTS user;
+CREATE table user(
+username VARCHAR(20)not null,
+password VARCHAR(20)not null,
+sex VARCHAR(10),
+age int,
+height DECIMAL(5,2),
+hobby VARCHAR(50),
+phone VARCHAR(50),
+address VARCHAR(200),
+aboutname VARCHAR(500),
+photo binary,
+aboutime varchar(500)
+);
+```
+
+```php
+//conn
+";
+ echo "返回登录界面
请重新登录";
+ die();
+}
+include_once('conn.php');// 包含数据库文件
+$sql = "select * from `user`";// 把user表里的所有数据查询出来的语句
+$result = mysqli_query($conn,$sql);
+?>
+
+
+
+
+
+
+ 牵手网首页
+
+
+牵手网-首页
+
+
+ 用户名 |
+ 密码 |
+ 性别 |
+ 身高 |
+ 爱好 |
+ 年龄 |
+ 住址 |
+ 手机号码 |
+ 头像 |
+ 交友宣言 |
+
+ 暂无数据! | ";
+ }else {
+ while ($row = mysqli_fetch_assoc($result)) {
+ ?>
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
+
+
+
+
+```
+
+```php+HTML
+//login.php
+
+
+
+
+
+
+
+ 用户登录
+
+
+
+
+
+
+
+ 用户登录
+
+
+
+
+
+
+
+重新登录!");
+ }
+
+ echo "登录成功!返回主页";
+
+ }
+?>
+
+
+
+```
+
+```php+HTML
+//register.php
+
+
+
+
+
+
+
+
+ 用户注册
+
+
+
+用户注册
+
+
+
+
+```
+
+```php
+//register_do.php
+
+ $value){
+ if($key!='提交'){
+ $$key=$value;
+ }
+}
+$hobby = implode(',',$hobby);
+
+
+// 开始使用mysql /1 连接服务器
+include_once ('./conn.php');
+
+// 编写SQL语句 注册其实是往数据库表里新增数据 insert
+$sql = "insert into `user` value (null,'$username','$password1',$sex,'$height','$hobby','$age','$address','$phone',null,'$aboutme')";
+//echo $sql;
+// 执行上面的SQL语句
+$result = mysqli_query($conn,$sql);
+// 判断
+if($result){
+ echo "注册成功!请登录!";
+}else{
+ die("注册失败。".mysqli_error($conn));
+}
+
+
+// 接文件
+//var_dump($_FILES);
+```
+
--
Gitee
From 9dd1c51c402a10582fec28d17c8d83b81f336e85 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=B1=A4=E4=BA=A6=E5=87=A1?= <1044020597@qq.com>
Date: Sun, 5 Jun 2022 13:30:35 +0000
Subject: [PATCH 2/2] =?UTF-8?q?=E9=87=8D=E5=91=BD=E5=90=8D=20=E6=B1=A4?=
=?UTF-8?q?=E4=BA=A6=E5=87=A1/20220605-PHP=E7=89=B5=E6=89=8B=E7=BD=91.txt?=
=?UTF-8?q?=20=E4=B8=BA=20=E6=B1=A4=E4=BA=A6=E5=87=A1/20220605-PHP?=
=?UTF-8?q?=E7=89=B5=E6=89=8B=E7=BD=91.md?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../20220605-PHP\347\211\265\346\211\213\347\275\221.md" | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename "\346\261\244\344\272\246\345\207\241/20220605-PHP\347\211\265\346\211\213\347\275\221.txt" => "\346\261\244\344\272\246\345\207\241/20220605-PHP\347\211\265\346\211\213\347\275\221.md" (100%)
diff --git "a/\346\261\244\344\272\246\345\207\241/20220605-PHP\347\211\265\346\211\213\347\275\221.txt" "b/\346\261\244\344\272\246\345\207\241/20220605-PHP\347\211\265\346\211\213\347\275\221.md"
similarity index 100%
rename from "\346\261\244\344\272\246\345\207\241/20220605-PHP\347\211\265\346\211\213\347\275\221.txt"
rename to "\346\261\244\344\272\246\345\207\241/20220605-PHP\347\211\265\346\211\213\347\275\221.md"
--
Gitee