Return to a page after sending a message with sweet alert

0
if ($resultado) {
   $mysql->commit();
   echo "<script>
   jQuery(function(){
   swal(\"¡Inscripción realizada exitosamente!\", \"Sus datos fueron enviados correctamente \", \"success\");
}
window.history.go(-1);
);
</script>";

Good evening everyone,

I am unable to operate the window.history.go (-1) I need that once an INSERT has been made in the Database, an alert is shown, in this case with sweet alert and then return to the page of the form, but I do not know how to do it.

Could you please guide me to solve this? Thank you very much already.

    
asked by francisco castillo 01.04.2018 в 04:41
source

1 answer

0

With a simple window.location, I hope I have helped          window.location.replace("urldelformulario.php");

    
answered by 01.04.2018 в 07:03