This question already has an answer here:
So i have some code that is sending an email to a user. The email contains a link which allows the user to change their password if they have forgotten it. The code works fine and sends the email. When i click the link it sends a GET request that contains the email of the user in the URL. Im just curious, is there a way to alter the code in php so when it sends the email the link in the email then sends a POST request. With the email of the user inside the POST body? Here is the code that is currently sending the email. Im not even sure if what im asking is possible.
$link = "http://localhost/myphp/talkbook2/forgotpassword/ResetPassword.php?Email=".$email;
$title = "Please click this link to reset your password";
$subject = "Reset Password";
$message = "<a href='". $link. "'>".$title. "</a>
";
$headers = "MIME-Version: 1.0". "
";
$headers .= "Content-type: text/html; charset=iso-8859-1". "
";
$headers .= "From: TalkBook". "
";
$headers .= "Reply-To: talkbookapp@gmail.com". "
";
$headers .= "Return-Path: talkbookapp@gmail.com". "
";
if(!isset($_SESSION['passwordEmailSent']) && empty($_SESSION['passwordEmailSent']))
{
$send = mail($email, $subject, $message, $headers);
$_SESSION['passwordEmailSent'] = 1;
}
else
{
$send = false;
}
return $send;
</div>