Tema: Auxilio::::
Ver Mensaje Individual
  #1 (permalink)  
Antiguo 23/09/2010, 11:11
dianays
 
Fecha de Ingreso: agosto-2010
Mensajes: 147
Antigüedad: 13 años, 8 meses
Puntos: 1
Pregunta Auxilio::::

Hola, tengo un problema... Tengo un combobox donde me jala datos de una tabla llamada USUARIOS. Tengo otros comboxs, donde cada uno me representan la fecha: AÑO, MES, DIA, HASTA AÑO2, MES2, DIA2; de donde al seleccionar al usuario y un rango de fechas me arroje datos de una tabla llamada REPORTE (folio, fecha, unidad, nombre)...

El combo de los nombres de los usuarios utilizo un codigo PHP, y con los demas lo hago mediante select...

Tengo el siguiente codigo, donde hago la consulta, pero no me sale, no se como hacerlo o como solucionarlo, espero me puedan ayudar, de ante mano muchas gracias...

Código PHP:
<?php 
if(isset($_POST["ACEPTAR"])){ 
$usuario=$_POST["usuario"]; 
$mil=$_POST["mil"]; 
$mes=$_POST["mes"]; 
$dia=$_POST["dia"]; 
$fecha=$mil."-".$mes."-".$dia
$ART_SEL=mysql_query("select folio, fecha, hora, unidad, nombre from reporte where id_nom='$usuario' and reporte.fecha='$fecha"
or die (
"error:".mysql_error()); 

$fila=mysql_fetch_array($ART_SEL); 
$num=mysql_num_rows($ART_SEL); 
if(
$num>0){ 

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 
'<script>alert("no existen datos"); history.back(-1); </script>'
}
}
?>