I have this form
<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>
Which goes here:
<?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";
}
?>
When I put my email, it outputs "Please check your email" but when I do I did receive anything, Also I want to receive that link with my $id
attached so in the third page Ill have a form requesting to change my password, by the id. My only problem now is that the email is not sending?
It doesnt send, and I get this error
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
Line 4 is require "connection.php"