It happens that I am making a small contact form for my site, I have almost finished everything, however I want that when you press the send button instead of sending me to another page, just show an alert saying that the message already sent.
<?php
$destino = "******************";
$nombre = $_POST["Nombre"];
$telefono = $_POST["Telefono"];
$correo = $_POSTO["Correo"];
$mensaje = $_POST["Mensaje"];
$contenido = "Nombre: ".$nombre. "\nTelefono: " .$telefono. "\nCorreo: " .$correo. "\nMensaje: " .$mensaje;
mail($destino, "Cotizacion", $contenido);
header("Location: index.html");
?>
This is my current php code.