1个回答
展开全部
要考虑到字符串本身是要用引号括住的,所以要这样:
$sql = "insert into users (slug,email,`password`,nickname) values ('".$slug."','".$email."','".$password."','".$nickname."')";
或者
$sql = "insert into users (slug,email,`password`,nickname) values ('$slug','$email','$password','$nickname')";
$sql = "insert into users (slug,email,`password`,nickname) values ('".$slug."','".$email."','".$password."','".$nickname."')";
或者
$sql = "insert into users (slug,email,`password`,nickname) values ('$slug','$email','$password','$nickname')";
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询