我有这个表格
<form class="form-horizontal" method="post" action="forgot.php">
<div class="form-group">
<label for="email" class="col-sm-2 control-label">Please enter your email:</label>
<div class="col-sm-10">
<input type="email" class="form-control" id="email" name="email" placeholder="example@domain.com" value="">
</div>
</div>
<div class="form-group">
<div class="col-sm-10 col-sm-offset-2">
<input id="submit" name="submit" type="submit" value="Send" class="btn btn-primary">
</div>
</div>
<div class= "row">
<a class= "btn btn-success pull-right" href= "index.php">Back</a>
</div>
</form>
其中:
<?php
error_reporting(-1);
ini_set('display_errors', 'On');
require "connection.php";
$email = $_POST['email'];
if(isset($_POST['submit']))
{
$check = mysqli_query($conn, "select * from users where email = '$email' ");
$row = mysqli_fetch_array($check);
$message ="Please click here to create a new password www.jasmine.com/id?=" . $row['id'];
$from = 'From: jazz@hotmail.com';
$subject = 'Change password';
$body = "E-Mail: $email\n Message:\n $message";
if($row)
{
mail ($email, $subject, $body, $from);
echo "Please check your email";
}
}
else
{
echo "Email Not Found";
}
?>
当我发送电子邮件时,它会输出“请检查您的电子邮件”,但是当我这样做时,我确实收到了任何内容,而且我希望收到我所附的$id
链接,因此在第三页中我有一个表单请求通过ID更改我的密码。我现在唯一的问题是电子邮件没有发送?
它没有发送,我收到此错误
Warning: mysqli::mysqli(): Headers and client library minor version mismatch. Headers:50541 Library:50629 in /var/www/ml/public/new_system/connection.php on line 4
第4行是require "connection.php"