我想我错过了验证PHP请求的一些内容。我实际上在做$result = $req->fetch();
,但result
因某种原因总是返回false。
$bdd = new PDO($conStr,$user,$pass);
$req = $bdd->prepare('INSERT INTO users(login, password, dateregister) VALUES(?, ?, NOW())');
$req->execute(array($loginR,$passwordR));
$result = $req->fetch();
答案 0 :(得分:1)
检查执行功能的返回值是否成功/失败消息
$res = $req->execute(array($login_fieldR,$password_fieldR));
if (!$res )
{
echo '<p id="popup_text">Problem..</p>';
}
else
{
echo '<p id="popup_text">You are registered ! You can logged in now';
}