Try using php header function.
Example would be in PHP
header("Location: $_SERVER['HTTP_REFERER']");
Where $_SERVER['HTTP_REFERER'] by PHP.net is
The address of the page (if any) which referred the user agent to the current page. This is set by the user agent. Not all user agents will set this, and some provide the ability to modify HTTP_REFERER as a feature. In short, it cannot really be trusted.
<?php
$to = "email";
$subject = "mailed from";
$txt = $_POST['first-name']." ".$_POST['last-name']." sends message from.
persons number is: ".$_POST['phone']." message is:
".$_POST['message'];
$headers = "From: ".$_POST['email'];
mail($to,$subject,$txt,$headers);
// Redirect after mail
header("Location: $_SERVER['HTTP_REFERER']");
?>