Hello so I have this contact form
HTML
<form action="mail.php" method="POST">
<p>Team Name</p> <input type="text" name="name">
<p>Your Email</p> <input type="text" name="email">
<p>Players</p><textarea name="message" rows="6" cols="25"></textarea><br />
<input type="radio" name="region" value="Europe" checked>Europe
<br>
<input type="radio" name="region" value="North America">North America
<br>
<input type="submit" value="Send">
</form>
PHP
<?php
$name = $_POST['name'];
$email = $_POST['email'];
$region = $_POST['region'];
$message = $_POST['message'];
$formcontent=" From: $name $email $region $message";
$recipient = "myemail@email.com";
$subject = "$name";
$mailheader = "From: $email \r\n";
mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
?>
However when I click submit it auto redirects to a new page mail.php, how can I get it to stay on the same page and replace the form with thankyou or if not possible have the message at the bottom of the form below the send button.
One final thing I want to change it so when it sends the email itself the data is in this format with breaks inbetween
Team Name
Email
Region
Players
Vs what It does at the moment when I read the email I've sent
From: My Team myemail@email.com Europe Player1
Player2
Player3
Player4
Player5