I was working with a php mail form, a very simple one. It works fine except when i refresh the page (F5), pop up an alert that the page will re use the info provided. By this point the form is clear and send the last interaction.
<?php
if(count($_POST))
{
if (mail(
"12345@mywebsite.com",
"Web contact: ".$_POST['subject'],
" Nombre: {$_POST['name']}\n ID: {$_POST['id']}\n Issue: {$_POST['subject']}\n\n".$_POST['message'],
"From: Mywebsite.com // MAILER <noreply@mywebsite.com>"
))
echo "<script>$(document).ready(function(){alert('Mensaje enviado, muchas gracias.'); window.location.href = 'http://somewebsite.com'; });</script>";
else
echo '<div style="color:#ff6600;display:block;padding:10px 20px;border:1px solid #ff6600 ;margin-bottom:20px">Falló el envio</div>';
}
?>
Thats the code, i dont know what could be wrong. A friend told me something about a forwarding process and adding some lines will solve it but i didnt understand it. btw, im a beginner.
Thanks for the support.