ya hasta me da pena postear pero pues sigue sin salir ya lo puse dentro del form pero creo que escribi mal el selcet o no se si influya lo que les comentaba que traia los resultados en un include de otro php pero no creo que sea esto xq los de los text si funcionan asi que lo mas seguro esque estoy escribiendo mal el select o de plano no se :s
Código HTML:
<form name="form1" method="post" action="<?php echo $PHP_SELF;?>">
<SELECT name='id_sistema'>
<?php
$sSQL="SELECT * FROM tipo_sistemas ";
$result=mysql_query($sSQL);
while ($row = mysql_fetch_array($result)) {
if ($row['SISTEMA'] == $_POST['id_sistema']) {
echo "<option selected=\"selected\" value=\'".$row['id_sistema']."'>".$row['SISTEMA']."</option>";
} else {
echo "<option value=\'".$row['id_sistema']."'>".$row['SISTEMA']."</option>";
}
}
mysql_free_result($result);
?>
</select>
<label>
<p> </p>
<div align="left">
<h1>Busqueda Entre Fechas</h1>
<table width="758" height="58">
<tr>
<th width="86" scope="col">Desde</th>
<th width="199" scope="col"><input type="text" name="desdeF" id = "desdeF" value="<?=$_POST['desdeF']?>" > <img src="img/calendar.gif" id="btn_desde" alt="calendario" align="texttop"/>
<script type="text/javascript">
Calendar.setup(
{
inputField : "desdeF", // ID of the input field
showsTime : true,
ifFormat : "%Y-%m-%d %I:%M:%S ", // the date format
button : "btn_desde" // ID of the button
}
);
</script></th>
<th width="86" scope="col">Hasta</th>
<th width="199" scope="col"><input type="text" name="hastaF" id = "hastaF" value="<?=$_POST['hastaF']?>" > <img src="img/calendar.gif" id="btn_hasta" alt="calendario" align="texttop"/>
<script type="text/javascript">
Calendar.setup(
{
inputField : "hastaF", // ID of the input field
ifFormat : "%Y-%m-%d %I:%M:%S", // the date format
showsTime : true,
button : "btn_hasta" // ID of the button
}
);
</script></th>
<th width="158" scope="col"><input type="submit" name="Submit" value="Buscar"></th>
</tr>
</table>
</label>
</form>