I am a newbie in programming, I recently made an "application" which saves some data in an input to a table in mysql and shows them on the page in the form of a table, by a form
<form action="enviar.php" method="post" autocomplete="off">
<p><b>Fecha de Origen<br/><input type="text" name="FechaO" placeholder="Escriba la Fecha" required></input></b></p>
<p><b>Materia<br/><input type="text" name="materia" placeholder="Escriba la Materia" required></input></b></p>
<p><b>Descripcion<br/><input type="text" name="Descripcion" placeholder="Escriba la Descripcion" required></input></b></p>
<p><b>Fecha de Entrega<br/><input type="text" name="FechaE" placeholder="Escriba la Fecha" required></input></b></p>
<input type="submit"/>
</form>
<?php
header("Location: Formulario.php");
include("php.php");
if($_POST){
$fecha1 = $_POST['FechaO'];
$materia = $_POST['materia'];
$descripcion = $_POST['Descripcion'];
$fecha2 = $_POST['FechaE'];
mysql_query("INSERT INTO tareas_t(Fecha_de_Origen,Materia,Descripcion,Fecha_de_Entrega)values('$fecha1','$materia','$descripcion','$fecha2')") or die(mysql_error());
}
?>
but when I hit the send button, it redirected me to the page, then I put header ("Location: form.php"), and it works perfectly but I want it to send and send the data to the mysql table, this shows me an alert saying saved task, thanks for the help and the attention given.