Código PHP:
Ver original
<? ?> <? include "conectar.php"; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html lang="en" xmlns="http://www.w3.org/1999/xhtml"> <script language="JavaScript"> function tabular(e,obj) { tecla=(document.all) ? e.keyCode : e.which; if(tecla!=13) return; frm=obj.form; for(i=0;i<frm.elements.length;i++) if(frm.elements[i]==obj) { if (i==frm.elements.length-1) i=-1; break } frm.elements[i+1].focus(); return false; } function tabular2(e,obj) { tecla=(document.all) ? e.keyCode : e.which; if (tecla>13 && tecla < 48){return false;} if (tecla>57){return false;} if(tecla!=13) return; frm=obj.form; for(i=0;i<frm.elements.length;i++) if(frm.elements[i]==obj) { if (i==frm.elements.length-1) i=-1; break } frm.elements[i+1].focus(); return false; } </script> <head> <title>Ingreso de Equipos</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <!-- .Estilo1 { font-size: 18px; color: #FFFFFF; } .Estilo3 {color: #FFFFFF} .Estilo4 { font-size: 16px; color: #FFFFFF; } --> </style> <style type="text/css"> <!-- .Estilo4 {font-size: 36px} .Estilo5 {font-size: 18px} .Estilo6 {font-size: 24px} --> </style> </head> <body> <p> <? /* include "encabezado.php"; */ ?> </p> <table border="0"> <tr> <th scope="col"><img src="imagenes/logoinformatica.jpg" width="182" height="53" /></th> <th scope="col"><span class="Estilo3 Estilo4">"Ingreso de Equipos"</span></th> </tr> </table> <p><br> <br> </p> <div class="content"> <form method="POST" name="form1" action="ingreso_stock.php"> <table border="1" width="100%"> <tr> <td colspan="2" bgcolor="#00FFFF"><span class="Estilo1 Estilo6">Usuario</span></td> </tr> <tr> <td bgcolor="#00FFFF"><span class="Estilo5">Seleccione el usuario </span></td> <td bgcolor="#00FFFF"> <select name="usuario" onkeypress="return tabular(event,this)"> <? //por área $i=0; while($i < $rows) { echo("<option selected value=".mysql_result($result, $i, "num_unico").">".mysql_result($result, $i, "nombre_largo")."</option>"); }else{ echo("<option value=".mysql_result($result, $i, "num_unico").">".mysql_result($result, $i, "nombre_largo")."</option>"); } $i++; } } ?> </select></td> </tr> </table> <input type="submit" value="Mostrar"> </form> <? if ($_POST["usuario"]!=""){ //selecciona usuario a modificar