From 67cb5b07be7928bc0f8aba2ba94c42f00b3677a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9F=A6=E6=B0=B8=E9=9F=AC?= <1795535399@qq.com> Date: Fri, 27 May 2022 19:47:38 +0800 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 --- .../20220524-\344\275\234\344\270\232.md" | 4 +- .../20220525-Cookie&Session.md" | 274 ++++++++++++++++++ 2 files changed, 276 insertions(+), 2 deletions(-) create mode 100644 "\351\237\246\346\260\270\351\237\254/20220525-Cookie&Session.md" diff --git "a/\351\237\246\346\260\270\351\237\254/20220524-\344\275\234\344\270\232.md" "b/\351\237\246\346\260\270\351\237\254/20220524-\344\275\234\344\270\232.md" index a30d881..fb7db70 100644 --- "a/\351\237\246\346\260\270\351\237\254/20220524-\344\275\234\344\270\232.md" +++ "b/\351\237\246\346\260\270\351\237\254/20220524-\344\275\234\344\270\232.md" @@ -138,10 +138,10 @@ $row = mysqli_fetch_assoc($result);
- + - + diff --git "a/\351\237\246\346\260\270\351\237\254/20220525-Cookie&Session.md" "b/\351\237\246\346\260\270\351\237\254/20220525-Cookie&Session.md" new file mode 100644 index 0000000..9a5b16d --- /dev/null +++ "b/\351\237\246\346\260\270\351\237\254/20220525-Cookie&Session.md" @@ -0,0 +1,274 @@ +![2022-5-23 10-41-39](https://tva1.sinaimg.cn/large/e6c9d24egy1h2n7bhqxr0j218g0p0q5o.jpg) + +```html +// 登陆页面 文件名 dl + + + + + 学生信息登陆页面 + + +

学生信息登陆

+ +
图书名称学生姓名
图书价格学生成绩
+ + + + + + + + + + + + + + + +
+ 账号: + + +
+ 密码: + + +
+ + + 3天内自动登陆 +
+ +
+
+``` + +```php +//登陆验证 dlcg +马上去登陆"; +} +``` + +```php +//注销 zx +返回登陆页面"; +``` + +```php +//连接数据库 文件名:sjkxx + + + + + + 学生信息管理系统 + + + +

学生信息管理首页

+切换账号 +退出登陆 + + + + + + + + + "; + }else { + while ($row = mysqli_fetch_assoc($result)) { + ?> + + + + + + + +
学生编号学生姓名学生成绩操作
暂无数据!
修改| + 删除 +
+添加学生信息 + + +``` + +```php +//添加页面 文件名:tj + + + + + 添加学生信息 + + +

添加学生信息

+
+ + + + + + + + + + +
学生姓名
成绩
   +     
+ 返回 + + +``` + +```php +//添加 文件名:tj1 +返回首页"; +}else{ + echo "添加失败!"; +} +``` + +```php +//修改页面 文件名:xg + + + + + 修改学生信息 + + +

修改学生信息

+ + + + + + + + + + + + +
学生姓名
学生成绩
   +      +
+ 返回 + + +``` + +```php +//修改 文件名:xg1 +返回首页"; +}else{ + echo "修改失败!"; +} +``` + +```php +//删除 文件名:sc +返回首页"; +}else{ + echo "删除失败!"; +} +``` + -- Gitee From 46e6716e445da1a66523de1726d0d5ef5db4bb9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9F=A6=E6=B0=B8=E9=9F=AC?= <1795535399@qq.com> Date: Fri, 27 May 2022 19:51:50 +0800 Subject: [PATCH 2/2] a --- .../20220525-Cookie&Session.md" | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git "a/\351\237\246\346\260\270\351\237\254/20220525-Cookie&Session.md" "b/\351\237\246\346\260\270\351\237\254/20220525-Cookie&Session.md" index 9a5b16d..56590e8 100644 --- "a/\351\237\246\346\260\270\351\237\254/20220525-Cookie&Session.md" +++ "b/\351\237\246\346\260\270\351\237\254/20220525-Cookie&Session.md" @@ -272,3 +272,25 @@ if($ret){ } ``` + + +```php +/* +Cookie +setcookie(string $name[,string $value[,int $expire =0[,string $path [,string $domain[,int $secure]]]]]) +变量名 +值 +失效时间 +在服务器端的有效路径 +有效的域名 +指明是否通过安全的HTTPS,值为0或1 + +Session +seesion_start(); 每次使用要启动 +$_SEESION['名']=""; +unset($_SEESION['名']); 删除单个数据 +$_SEESION=array(); 删除所有数据 +seesion_destory(); 结束会话 +*/ +``` + -- Gitee