Intento modificar una fila de una tabla que es resultado de una busqueda... para ello tengo el siguiente codigo: (mostrar_inventario.php)
Código PHP:
Ver original
<? include("conexion.php"); include ('/login/seguridad.php'); $lab=$_POST['inv_labs']; ?> <head> <link href="Js/styles.css" rel="stylesheet" type="text/css"> <script type="text/javascript" src="Js/jquery/jquery.js"></script> <script type="text/javascript" src="Js/jquery/jquery.tablesorter.js"></script> <script type="text/javascript" src="Js/jquery/jquery.tablesorter.pager.js"></script> <script type="text/javascript"> $(document).ready(function() { $("#encuentra").tablesorter(); } ); </script> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Documento sin título</title> </head> <body> <div align="center"> <table width="100%" border="0" class="tablesorter" id="encuentra"> <thead> <tr> <th width="22%" align="center">Id_Software</th> <th width="11%" align="center">Laboratorio</th> <th width="35%" align="center">Software</th> <th width="13%" align="center">Version</th> <th width="19%" align="center">Estado</th> <th width="22%" align="center">Editar</th> </tr> </thead> <tbody> <? if ($est == "0"){ FROM laboratorio as l, software as s, soft_lab as sl WHERE l.id_lab=sl.id_lab and s.id_software=sl.id_software and l.id_lab ='$lab'",$link); $cont=0; ?> <tr> <td><div align="left"><span"> </span></div></td> <td><div align="left"> </div></td> <td><div align="left"> </div></td> <td ><div align="left"> </div></td> <td><span> </span></td> <td><a href="modifica_inventario.php?id=<?=mysql_result($consulta, $cont, "id_software");?>" target="_self"><img src="images/addedit2.gif" width="17" height="18" border="0" style="cursor:pointer; font-size: 8px;" title="Editar registro..."></a></td> </tr> <? $cont = $cont + 1; } } else { FROM laboratorio as l, software as s, soft_lab as sl WHERE l.id_lab=sl.id_lab and s.id_software=sl.id_software and l.id_lab ='$lab'",$link); $cont=0; { ?> <tr> <td><div align="left"><span> </span></div></td> <td><div align="left"><strong> </strong></div></td> <td><div align="left"><strong> </strong></div></td> <td ><div align="left"><strong> </strong></div></td> <td><span><strong> </strong></span></td> <td><a href="modifica_inventario.php?id=<?=mysql_result($consulta, $cont, "id_software");?>" target="_self"><img src="images/addedit2.gif" width="20" height="18" border="0" style="cursor:pointer"></a></td> </tr> <? $cont = $cont + 1; } } ?> </tbody> </table> <p align="left"> </p> </div> </body> </html>
Y se supone que de este código le envío el id del software a modifica_inventario.php:
Código PHP:
Ver original
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Validar formularios</title> <script src="jquery-1.3.1.min.js" type="text/javascript"></script> <script src="jquery.validate.min.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function() { $("#comentariosFrm").validate(); }); </script> <link href="style.css" rel="stylesheet" type="text/css" /> <body> <? $id=$_GET['id_software']; include ("conexion.php"); $usql="SELECT * FROM software WHERE id_software='$id'"; { } ?> <fieldset id="form"> <legend>Modifica software</legend> <form name="comentariosFrm" id="comentariosFrm" method="post" action="update_inventario.php"> <div align="center"> <ol> <li><span><span>Modificar software id:<span> <input name="id" type="text" id="id" value="<?=$id_software;?>" /> </span></span></span><br /> <table width="47%" height="131" border="0" align="center"> <tr> <td width="95" ><span >Nombre:</span></td> <td width="386"><label> <input name="marca" type="text" id="marca4" value="<?=$nombre;?>" /> </label></td> </tr> <tr> <td><span>Version:</span></td> <td><label> <input name="modelo" type="text" id="modelo" value="<?=$version;?>" /> </label></td> </tr> <tr> <td><span class="style18">Estado:</span></td> <td><input name="modelo2" type="text" id="modelo2" value="<?=$estado;?>" /></td> </tr> <tr> <td height="21"><div align="right"> <input type="submit" name="Submit" value="Actualizar" /> </div></td> </tr> </table> </li> </ol> </div> <ol> </ol> </form> </fieldset> </body> </html>
El problema es que no me muestra nada en este ultimo archivo... no se si no estara recibiendo la variable del id_software, probe con echo $id; pero no me muestra nada...
de antemano muchas gracias