Tengo un formulario en PHP que cuando envia, aparece el mensaje :
Enhorabuena!!
Gracias , su mensaje se ha enviado!
Le responderemos lo antes posible.
Pero se queda ahi, yo lo que quiero es:
1) A ser posible, retorne al index.
2) Si no es posible lo primero, insertarle un vinculo que diga: Volver al inicio. ( Y que al hacer click vuelva al index.)
Os dejo el codigo:
Código:
<?php } else { error_reporting(0); if (mail($to, $subject, $msg, "From: $email\r\nReply-To: $email\r\nReturn-Path: $email\r\n")) //Message sent! //It the message that will be displayed when the user click the sumbit button //You can modify the text if you want echo nl2br(" <div class=\"MsgSent\"> <h1>Enhorabuena!!</h1> <p>Gracias <b><?=$name;?></b>, su mensaje se ha enviado!<br /> Le responderemos lo antes posible. </p> </div> "); else // Display error message if the message failed to send echo " <div class=\"MsgError\"> <h1>Error!!</h1> <p>Lo siento<b><?=$name;?></b>, intentelo de nuevo!</p> </div>"; } ?>