Del: 26/12/2014 Al: 31/12/2014 que solo ese rango.
El filtro ya me funciona pero hasta que le doy en el botón filtrar, muchas gracias por su ayuda!!!
aquí les dejo el código.
Es la consulta:
Código PHP:
if($sql_eic!=""){
$sql="SELECT * FROM dbo.EVENTOS WHERE ".$sql_eic;
echo $sql;
$res=sqlsrv_query($con,$sql);
}
Código PHP:
<?php if ($sql_eic==""){ ?>
<form METHOD="POST" ACTION="w_con_eventos_ok.php">
<input type="checkbox" checked="checked" name="filtro_fecha" >FILTRO POR FECHAS:
DEL: <input type="date" value="<?php echo fecha_input(); ?>" name="fecha_inicial">
AL: <input type="date" value="<?php echo $r; ?>" name="fecha_final">
</form>
<?php }?>
Código PHP:
else{
?>
<form METHOD="POST" ACTION="w_con_eventos_ok.php">
<div ><input type="submit" value="NUEVA BUSQUEDA"></div>
</form>
</div>
<br> <br> <br> <br> <br> <br>
<table id="estilo" border=1>
<thead>
<tr>
<th></th>
<th style="cursor: pointer;">Evento</th>
<th style="cursor: pointer;">Instancia</th>
<th style="cursor: pointer;">Quien Invita</th>
<th style="cursor: pointer;">Plan</th>
<th style="cursor: pointer;">Financiamiento</th>
<th style="cursor: pointer;" >Representante</th>
<th style="cursor: pointer;">Orientación Política</th>
<th style="cursor: pointer;">Fecha y Hora</th>
</tr>
</thead>
<tbody>
<?php
$m=0;
while ($f=sqlsrv_fetch_array($res))
{
$m++;
if (!is_null($f['fecha_hora']) )
{
?>
<tr>
<td><?php echo $m; ?></td>
<td> <a Method="GET" href="w_imprimir_evento.php?ev=<?php echo $f['id_evento'];?>" target="_blank" onClick="window.open(this.href, this.target, 'width=800,height=600'); return false;"><?php echo utf8_encode($f['evento']); ?></a></td>
<td><?php echo utf8_encode($f['instancia']); ?></td>
<td><?php echo utf8_encode($f['invita']); ?></td>
<td><?php echo utf8_encode($f['planmm']); ?></td>
<td><?php echo utf8_encode($f['financiamiento']); ?></td>
<td><?php echo utf8_encode($f['asistio_representante']); ?></td>
<td><?php echo utf8_encode($f['orientacion_politica']); ?></td>
<td><?php echo utf8_encode($f['fecha_hora']); ?></td>
</tr>
<?php
}
}
}
?>