使用 $email 验证会出现 mysql_syntax 错误

发布于 2024-12-24 21:22:24 字数 247 浏览 1 评论 0原文

我有以下代码:

$update = mysql_query("UPDATE member_regok SET newmemberid = '.$last_id.', status = 1 WHERE email = '".$email."'");

此代码返回““@email.com”后的语法错误”。我可以用 echo 返回所有这些 $var 并得到结果,但运行此查询不起作用。使用 $email 验证有问题吗?

i have the following code:

$update = mysql_query("UPDATE member_regok SET newmemberid = '.$last_id.', status = 1 WHERE email = '".$email."'");

This code returns "syntax error after "@email.com" ". I can return all these $var with echo and I get the result but running this query doe not work. Is there a problem with validating with $email?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

知足的幸福 2024-12-31 21:22:24

您可以尝试:

$update = mysql_query("UPDATE member_regok SET newmemberid = '$last_id', status = '1' WHERE email = '$email'");

You can try:

$update = mysql_query("UPDATE member_regok SET newmemberid = '$last_id', status = '1' WHERE email = '$email'");
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文