What did I do wrong? My code doesn't work
if (isset($_POST['submit'])){
$fecha = ($_POST['fecha']);//date
$hora_in = ($_POST['hora_incial']); //time
$hora_fin = ($_POST['hora_final']);//time
$comentarios =($_POST['comentarios']);//text
//inserting data order
$order = "INSERT INTO control ('Fecha','Hora_incial','Hora_final','Comentarios') VALUES('".$fecha."','".$hora_in."','".$hora_fin."','".$comentarios."')";
//declare in the order variable
$result = mysql_query($order); //order executes
if($result){
echo("<br>Input data is succeed");
} else{
echo("<br>Input data is fail");
}
}
It shows me fail always. The connection is ok, but I can't insert the data
Thanks for you help !! :)