PHP+MySQL注意事项


1.PHP 表单未指明method默认的是GET的提交方式
之前的action.php未指明提交方式所以是GET方式,故del操作得用GET
但是add,edit操作使用的方式是POST,故操作使用POST

2.表单一定需要导入到php文件中,不然不知道表单来源
例:需要转递studentid
<a href='studentedit.php?studentid=({$row['studentid']})'>修改</a>
之前直接访问修改的php文件,会发生错误,说studentid没有声明,需要从查询哪里访问,因为查询具有上面的传递

3.数据库中部分单词是关键字比如 change

4.存储中文出错 字符集改为utf8  因为有些默认的不是utf8可能是latinl
HTML 表单中有两种类型的单元格:

表头单元格 - 包含表头信息(由 th 元素创建)
标准单元格 - 包含数据(由 td 元素创建)

5.解决Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future:
因为PHP更新后 之前的某些语句不可以使用了

6.php上传图片到mysql并显示
https://blog.csdn.net/mznewfacer/article/details/7600168

https://blog.csdn.net/fdipzone/article/details/39915131

7.php 上传图片保存到数据库例子

https://blog.csdn.net/fdipzone/article/details/39915131

8.php文件上传 你真的掌握了吗

https://www.jb51.net/article/98473.htm

9.WampServer服务器离线问题的解决方法

https://blog.csdn.net/bing_bing_a/article/details/52785673

10.PHP学习手册
http://www.php.net/function.mysql-real-escape-string

11.综合学习网站
https://segmentfault.com/q/1010000010419593

12.HTML/CSS模板块
http://sc.chinaz.com/moban/cssmoban.html

http://www.cssmoban.com/ 

13.PHP引号转义中解决POST,GET,Mysql数据自动转义问题
https://blog.csdn.net/yw5201314/article/details/9425457


猜你喜欢

转载自blog.csdn.net/deepseazbw/article/details/80872733