***update_reporte.php***
Código HTML:
Ver original
<form id="form1" name="form1" method="post" action="update_reporte.php"> <?php $conn = @mysql_connect("localhost","root",""); if (! $conn) { echo "connion no establecida"; } if (! @mysql_select_db("bd_control",$conn)) { echo "no se puede seleccionar la base de datos"; } $sql="select folio from reporte"; $consu= mysql_query ($sql); echo mysql_error ($conn); echo "<select name=folio>"; while ($clv=mysql_fetch_array($consu)){ } echo "</select>"; ?><label> <input name="Aceptar" type="Submit" id="Aceptar" value="Aceptar" /> </label> </form> <form id="form2" name="form2" method="post" action="modificar_reporte2.php"> <?php if(isset($_POST["Aceptar"])&& !empty($_POST['folio'])){ $clvs=$_POST["folio"]; $donador=mysql_query("SELECT folio, fecha, hora, unidad, area, reporta, tel, ext, vpn, inventario, serie, ip, marca, modelo, dispositivo, falla, nombre, actividades FROM reporte, unidades, usuarios WHERE reporte.id_unidad=unidades.id_unidad AND reporte.id_nom=usuarios.id_nom AND reporte.folio=$clvs"); $error=mysql_error($conn); $fila=mysql_fetch_array($donador); } ?><table width="33%"> <tr> <td>Folio: <label> <input name="folio" type="text" id="folio" size="5" value="<?php echo $fila["folio"]; ?>" /> <td>Fecha: <label> <input name="fecha" type="text" id="fecha" value="<?php echo $fila["fecha"]; ?>" /> </label> </td> <td>Hora: <label> <input name="hora" type="text" id="hora" value="<?php echo $fila["hora"]; ?>" /> </label> </td> </tr> </table> <table width="100%" border="0"> <tr> <input name="unidad" type="text" id="unidad" value="<?php echo $fila["unidad"]; ?>" size="50" /> </tr> <tr> <input name="area" type="text" id="area" size="50" onkeypress="return letras(event);" value="<?php echo $fila["area"]; ?>"/> </tr> <tr> <input name="reporta" type="text" id="reporta" size="50" onkeypress="return letras(event);" value="<?php echo $fila["reporta"]; ?>"/> <input name="tel" type="text" id="tel" onkeypress="return numeros(event);" value="<?php echo $fila["tel"]; ?>"/> </tr> <tr> <input name="ext" type="text" id="ext" onkeypress="return numeros(event);" value="<?php echo $fila["ext"]; ?>"/> <input name="vpn" type="text" id="vpn" onkeypress="return numeros(event);" value="<?php echo $fila["vpn"]; ?>"/> </tr> <tr> </tr> </table> <table width="100%" border="0"> <tr> <input name="inventario" type="text" id="inventario" onkeypress="return numeros(event);" value="<?php echo $fila["inventario"]; ?>"/> <input name="serie" type="text" id="serie" onkeypress="return num_let(event);" value="<?php echo $fila["serie"]; ?>"/> </tr> <tr> <input name="ip" type="text" id="ip" value="<?php echo $fila["ip"]; ?>"/> <input name="marca" type="text" id="marca" onkeypress="return letras(event);" value="<?php echo $fila["marca"]; ?>"/> </tr> <tr> <input name="modelo" type="text" id="modelo" onkeypress="return num_let(event);" value="<?php echo $fila["modelo"]; ?>"/> <input name="dispositivo" type="text" id="dispositivo" onkeypress="return letras(event);" value="<?php echo $fila["dispositivo"]; ?>"/> </tr> <tr> </tr> <tr> <input name="atendido" type="text" id="atendido" value="<?php echo $fila["nombre"]; ?>" size="50"/> </tr> <tr> <input type="hidden" name="id" value="<?php echo $clvs;?>" /> </tr> </table> <p align="center"> <label> <input name="Modificar" type="submit" id="Modificar" value="Modificar" /> </label> </p> </form>
***modificar_reporte2.php***
Código PHP:
Ver original
<?php include("conexion.php"); $link=Conectarse(); $clvs=$_POST['id']; $unidad=$_POST['unidad']; $area=$_POST['area']; $reporta=$_POST['reporta']; $tel=$_POST['tel']; $ext=$_POST['ext']; $vpn=$_POST['vpn']; $inventario=$_POST['inventario']; $serie=$_POST['serie']; $ip=$_POST['ip']; $marca=$_POST['marca']; $modelo=$_POST['modelo']; $dispositivo=$_POST['dispositivo']; $falla=$_POST['falla']; $actividades=$_POST['actividades']; $Sql="UPDATE reporte SET id_unidad='$unidad', area='$area', reporta='$reporta', tel='$tel', ext='$ext', vpn='$vpn', inventario='$inventario', serie='$serie', ip='$ip', marca='$marca', modelo='$modelo', dispositivo='$dispositivo', falla='$falla', actividades='$actividades' where folio='$clvs'"; ?>
No se en donde este mi error... espero puedan ayudarme, de antemano muchas gracias... Dios les bendiga!!!
