防止sql注入

一般的驗證方式 //查詢某個管理員是否存在 $sql="select*from user1 where name='ls'and password='xxxxxx'"; //看看有沒有查詢用戶 if(查詢到){ header("admin.php"); }else{ header("login.php"); } 解決方案 使用預編譯 改變驗證數據庫用戶邏輯 $sql="select pass
相關文章
相關標籤/搜索