tengo un problema con un formulario
tengo 4 checkbox
Código HTML:
<input type="checkbox" name="fase[]"value="L1"/>Fase A <input type="checkbox" name="fase[]"value="L2"/>Fase B <input type="checkbox" name="fase[]"value="L3"/>Fase C <input type="checkbox" name="fase[]"value="N/A"/>N/A
Código PHP:
<?php
$conx = @mysql_connect("localhost","root","");
if (!$conx)
{
die('could not connect: ' . mysql_error());
}
{
$schedule= $_POST['schedule'];
$estilo= $_POST['estilo'];
$serie=$_POST['serie'];
$id=$_POST['id'];
$linea=$_POST['linea'];
$area=$_POST['area'];
$kva=$_POST['kva'];
$relojo=$_POST['relojo'];
$relojr=$_POST['relojr'];
$falla=$_POST['region'];
$codigo=$_POST['country'];
$fase1=$_POST['fase'];
$fecha=date("m-d-y");
$comenta=$_POST['comentarios'];
}
mysql_select_db("retrabajo", $conx);
$sql="INSERT INTO entrada (schedule,estilo,serie,idtx,linea,area,kvas,nrelojo,nrelojr,falla,codigo,fase,fecha,comentarios)
VALUES ('$schedule','$estilo','$serie','$id','$linea','$area','$kva','$relojo','$relojr','$falla','$codigo','$fase1','$fecha','$comenta')";
if (!mysql_query($sql,$conx))
{
die('Error; ' . mysql_error());
}
mysql_close($conx);
?>
<script language="javascript">
window.location="retrabajo.html";
</script>