douyi3307 2014-12-12 13:08
浏览 41
已采纳

Mysqli登录 - 我用这段代码保护免受Sql注入? [关闭]

I've been cruising on the forums for a while now and I was wondering if this is a secure decent way to create a login in mysqli.

It seems too easy and i'm not sure because the tutorial isn't using prepared statements...

Mysqli - Login tutorial

Is this a proper way of doing things?

I also found this and this seems "decent"

How does the daily programmer do this?

Is PDO so much more adviced even if your only using it for things such as databases for clubs, stores etc....rather than a big firm?

Better way?

  • 写回答

2条回答 默认 最新

  • doujiao7325 2014-12-12 13:13
    关注

    PDO might be a better way to go. It can provide for prepared statements which can remove instances of SQL injection attacks

    Have a look at the manual for PHP's PDO here

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 Matlab问题解答有两个问题
  • ¥50 Oracle Kubernetes服务器集群主节点无法访问,工作节点可以访问
  • ¥15 LCD12864中文显示
  • ¥15 在使用CH341SER.EXE时不小心把所有驱动文件删除了怎么解决
  • ¥15 gsoap生成onvif框架
  • ¥15 有关sql server business intellige安装,包括SSDT、SSMS。
  • ¥15 stm32的can接口不能收发数据
  • ¥15 目标检测算法移植到arm开发板
  • ¥15 利用JD51设计温度报警系统
  • ¥15 快手联盟怎么快速的跑出建立模型