Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: antonioreyna on Apr 28th, 2012  |  syntax: PHP  |  size: 1.58 KB  |  hits: 24  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2.  
  3. if ($conn = odbc_connect ('check', '', '')) //conexion
  4. {
  5.         //echo 'conectado!';
  6.             if (!empty($_POST)) : // verificamos que el usuario haga un submit de el form
  7.            
  8.   endif;
  9.                
  10. ?>
  11.  
  12. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  13. <html xmlns="http://www.w3.org/1999/xhtml">
  14. <head>
  15. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  16. <title>Documento sin título</title>
  17. </head>
  18. <body>
  19. <p align="center"><strong>CAPTURA</strong></p>
  20. <p>&nbsp; </p>
  21. <form id="form1" name="form1" method="post" action="">
  22.   <p><label>Fecha: <input type="text" name="fecha" id="fecha" /></label></p>
  23.   <p><label>Turno: <input type="text" name="turno" id="turno" /></label></p>
  24.   <p><label>Area: <select name="area" id="area">
  25. <?php
  26.     // consultamos la lista de areas
  27.     $strsql = 'SELECT id,area FROM areas ORDER BY area';
  28.        
  29.     if ($rs = odbc_exec($conn,$sql)):
  30.         while (odbc_fetch_row($rs)):
  31. ?>
  32.     <option>ok</option>
  33. <?php
  34.         endwhile;
  35.     endif;
  36. ?>
  37. </select></label></p>
  38.   <p><label>Punto de Recoleccion: <input type="text" name="punto_recoleccion" id="punto_recoleccion" /></label></p>
  39.   <p><label>Problema: <select name="problema" id="problema"></select></label>
  40.   <p><label>Categoria: <select name="categoria" id="categoria"></select></label></p>
  41.   <p><label>Libras: <input type="text" name="libras" id="libras" /></label></p>
  42.   <p><input name="guardar" type="submit" value="Guardar" /></p>
  43. </form>
  44.  
  45. <p>&nbsp;</p>
  46.  
  47. </body>
  48. <?php
  49.     odbc_close($conn);
  50. }
  51. ?>
  52. </html>