Hola tengo dudas jejeje la vdd no soy muy buena programando... hay muchas cosas que no he visto y que se requiere...
Mi siguiente problema es que necesito mostrar datos... asi como tipo buscador, por ejemplo:
Hacer un combo donde me de los nombre de los usuarios, y tener fechas (seleccionar un rango de fecha, porejemplo: del 1/sep/10 al 10/sep/2010) y al darle BUSCAR/ACEPTAR me muestre de la tabla de reporte: folio, fecha, unidad) pero de la persona seleccionada y con el rango que se le dio de fechas... espero me haya explicado.... bueno chicos espero su pronta respuesta... de antemano muchas pero muchasss gracias!!!!
Tengo lo siguiente:
<form id="form2" name="form2" method="post" action="buscar_folio.php">
<table width="75%" border="0">
<tr>
<td> </td>
<td> </td>
<td><p class="Estilo5"> </p>
<p class="Estilo5">Seleccione el Folio: </p></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td><label><br />
<?php
$CONEXION = mysql_connect("localhost","root","");
if (!$CONEXION) {
die("p class='Estilo1' align='center'>LO SIENTO, PERO NO HA PODIDO CONECTARSE A MYSQL: </p>" . mysql_error());
}
else{
mysql_select_db("bd_control", $CONEXION);
$ARTICULOS=mysql_query("SELECT folio FROM reporte ");
$ERROR = mysql_error($CONEXION);
if(empty($ERROR)){
echo "<select name=ART>";
echo "<option selected='' value=''> [ Seleccione ] </option>";
while ($ARTICULO=mysql_fetch_array($ARTICULOS)){
echo "<option value=".$ARTICULO["folio"].">".$ARTICULO["folio"]."</option>";
}
echo "</select>";
}
else{
$ERROR_CONSULTA="NO SE PUEDEN MOSTRAR LOS PRODUCTOS DEBIDO AL SIGUIENTE ERROR: ";
}
}
?>
<input type="submit" name="ACEPTAR" value="ACEPTAR" />
</label></td>
<td> </td>
</tr>
</table>
</form>
<?php
if($_POST["ACEPTAR"]){
$ART=$_POST["ART"];
$ART_SEL=mysql_query("select folio, fecha, hora, unidad, nombre from reporte , unidades, usuarios where reporte.id_unidad=unidades.id_unidad and reporte.id_nom=usuarios.id_nom and reporte.folio=$ART");
$error=mysql_error($CONEXION); echo $error;
$fila=mysql_fetch_array($ART_SEL);
if(mysql_num_rows($ART_SEL)){
echo "<table width='800' border='1' align='center'>
<tr>
<th width='90' scope='col'>FOLIO</th>
<th width='66' scope='col'>FECHA</th>
<th width='65' scope='col'>HORA</th>
<th width='69' scope='col'>UNIDAD</th>
<th width='66' scope='col'>NOMBRE</th>
</tr>
<tr>
<td>".$fila['folio']."</td>
<td>".$fila['fecha']."</td>
<td>".$fila['hora']."</td>
<td>".$fila['unidad']."</td>
<td>".$fila['nombre']."</td>
</tr>
</table>";
}
else{
echo "<div class='Estilo2' align='center'>EL PRODUCTO NO SE HA VENDIDO</div>";
}
}
?>
Hasta ahi me muestra al seleccionar un folio, pero quiero seleccionar un folio y luego seleccionar un rango de fechas y no se como hacerlo!... alguien podria ayudarme????????????
Ah y por cierto cada vez q entro a esta pag. me marca el siguiente error---> Notice: Undefined index: Aceptar in D:\wamp\www\imss\buscar_folio.php on line 67
y la vdd no se porq???
d ant mano muchas gracias!