I have a form on my website, that is used to reset a users password. When the button is pressed, it calls this:
if($getreq == 'true') {
//Begynder: Sender mail til brugeren
$headers = 'Content-type: text/html; charset=iso-8859-1';
$headers = "MIME-Version: 1.0" . "\r\n";
$headers = "Content-type:text/html;charset=UTF-8" . "\r\n";
$headers = 'FROM: <BLANK>';
$recipient = $getusermail;
$subject = "Password reset";
$message = "Password has been reset";
mail($recipient, utf8_decode($subject), utf8_decode($message), $headers);
}
Everything works fine, but I would like some sort of message like "Sending..." or "Wait while sending mail" - just to notify the user that the browser is working (see image; https://i.stack.imgur.com/nd37W.png). Is this possible? I have tried google it, but havn't been able to find it (maybe I search the wrong words). I thought that I could just 'echo' before mail(), but the mail action always comes first.
<a class="button_link_small" href="edit.php?change=user&step=edit&postid=<?php echo $getPostID?>&ResetUserPass&req=true">Reset password</a>
if($getreq == 'true') {
echo "Sending mail"
//Begynder: Sender mail til brugeren
Can someone help me with a solution, and have in mind, that I need it guided out. :-) If more code shown is needed, just say.