我连接了我的数据库和模式表格(注册表格),尝试输入3个配置文件数据,但它们在数据库中仅显示2个配置文件数据。试图重新输入最后的配置文件数据,但没有任何反应。
当我输入电子邮件andreas@gmail.com
时,它不起作用,但是当我输入andreas1@gmail.com
时,它出现在数据库中。为什么?
我试图创建一个新表单并删除数据库。
<button type="button" class="btn btn-default" data-toggle="modal" data-target="#mymodal2">Register</button>
我希望所有个人资料数据都进入我的数据库。这是完整的代码https://www.onlinenotepad.pro/wmhbr?view
答案 0 :(得分:0)
电子邮件问题的答案是因为数据库中不能有相同的输入。因此您可以加密该电子邮件或在数据库中检查电子邮件。例子
enter code here
// get the data from modal
$email = $_POST['example_email'];
// get email from database
// the example you already get from database and put into variable $user_email
then you can check it :)
if ( $email == $user_email) {
// redirect to the register page that you already make
header("Location: SignUp.php");
echo "The user already in database, try to use another email :)";