且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

用PHP和mysql登录

更新时间:2023-12-03 20:57:28

此行中可能存在问题:

     $query = "SELECT * FROM `usuarios` WHERE email='$email' and password='".$password."'"

您缺少串联运算符(我的意思是在$ email前加句号)尝试修复它.那可能行得通.并且还将您的代码与准备好的语句集成在一起,以防止sql注入.

You are missing concatenation operator(I mean a full stop before $email) Try fixing it. That might work. And also integrate ur code with prepared statement to prevent sql injection.

如果正在打印该错误,则机器可能未将代码解释为php代码.在login.php文件末尾查找语法错误

If that error is being printed, the machine might not be interpreting the code as a php code. Look for syntax errors at the end of login.php file