
Untitled
By:
antonioreyna on
Apr 28th, 2012 | syntax:
PHP | size: 1.58 KB | hits: 24 | expires: Never
<?php
if ($conn = odbc_connect ('check', '', '')) //conexion
{
//echo 'conectado!';
if (!empty($_POST)) : // verificamos que el usuario haga un submit de el form
endif;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
</head>
<body>
<p align="center"><strong>CAPTURA</strong></p>
<p> </p>
<form id="form1" name="form1" method="post" action="">
<p><label>Fecha: <input type="text" name="fecha" id="fecha" /></label></p>
<p><label>Turno: <input type="text" name="turno" id="turno" /></label></p>
<p><label>Area: <select name="area" id="area">
<?php
// consultamos la lista de areas
$strsql = 'SELECT id,area FROM areas ORDER BY area';
if ($rs = odbc_exec($conn,$sql)):
while (odbc_fetch_row($rs)):
?>
<option>ok</option>
<?php
endwhile;
endif;
?>
</select></label></p>
<p><label>Punto de Recoleccion: <input type="text" name="punto_recoleccion" id="punto_recoleccion" /></label></p>
<p><label>Problema: <select name="problema" id="problema"></select></label>
<p><label>Categoria: <select name="categoria" id="categoria"></select></label></p>
<p><label>Libras: <input type="text" name="libras" id="libras" /></label></p>
<p><input name="guardar" type="submit" value="Guardar" /></p>
</form>
<p> </p>
</body>
<?php
odbc_close($conn);
}
?>
</html>