如果用户通过表单注册,我有以下代码检查电子邮件地址是否已经注册,然后发送 PIN 提醒。
//check if email already taken
$emailRes = mysqli_query($conn,"SELECT * FROM users WHERE user_email = '{$_POST['srEmail']}'");
if(mysqli_num_rows($emailRes) != 0) {//if email found in table
$emailRec = mysqli_fetch_assoc($emailRes);
?>
Email already registered, would you like a PIN reminder?
<form method="POST" action="">
<input type="submit" name="srSend" value="Click here to get pin reminder" />
<input type="hidden" name="srEmail" value="<?php echo $emailRec['user_email']?>" />
</form>
<?php
exit;
}
目前这在提交完成后返回一个空白页面;我将如何添加“成功”。信息?