Good People,
I have a file in php that is called after completing a form in an html file. The function of this php file is to add data in the database and after inserting it has the following code:
if(mysqli_query($con, $sql)){
echo "<script>
alert('Inscrição realizada'); //alerta1
</script>";
header('Location: ../register.htm');
}
else{
echo "<script>
alert('Inscrição não realizada');
</script>";
header('Location: ../register.htm');
}
But after clicking submit does not show alert1 nor go to the page that I'm telling you to go. Does anyone know how this is resolved? And does anyone know how to go back to the form page but leave the textboxes blank?