Ver Mensaje Individual
  #3 (permalink)  
Antiguo 05/02/2008, 21:34
niltza
 
Fecha de Ingreso: agosto-2004
Mensajes: 440
Antigüedad: 20 años, 5 meses
Puntos: 2
Re: problema con fechas

mira este es mi codigo nose como aplicar lo q tu me dices a esto la verdad nose mucho de esto te agradezco tu ayuda...yo puse en tus select1.... el nombre de los miospero no se como ni en dondehacer el llamado a esa funcion
Código HTML:
<body>
<div align="center">
  <table width="630" border="0" class="contact">
    <tr>
      <td width="620"><form action="esp_its3.php" method="post">
          <table width="608" border="0" align="center" cellpadding="0" cellspacing="3">
            <tr>
              <td colspan="3"><div align="left"></div>

		      </td>
            </tr>
			
            <tr>
              <td width="134">&nbsp;</td>
              <td width="187">&nbsp;</td>
              <td width="243"><div align="center" class="its">
                  <div align="center">d/m/a</div>
              </div></td>
            </tr>
            <tr>
              <td valign="top" class="formu_txt_1">&nbsp;</td>
              <td valign="top" class="formu_txt_1"><p>Llegada</p></td>
              <td><div align="left"> <?php 

$an=date("Ye"); 
echo "A&ntilde;o:"; 
echo "<select name='an'>"; 
for($i=2008; $i<=2011; $i++){ 
    echo "<option value='".$i."' "; 
    if($an==$i){ 
        echo "selected"; 
    } 
    echo ">".$i."</option>"; 
} 
echo "</select>"; 

$me=date("ms"); 
echo "Mes:"; 
echo "<select name='me'>"; 
for($i=1; $i<=12; $i++){ 
    echo "<option value='".$i."' "; 
    if($me==$i){ 
        echo "selected"; 
    } 
    echo ">".$i."</option>"; 
} 
echo "</select>"; 

echo "Dia:"; 
echo "<select name='di'>"; 
$di=date("da"); 
for($i=1; $i<=31; $i++){ 
    echo "<option value='".$i."' "; 
    if($di==$i){ 
        echo "selected"; 
    } 
    echo ">".$i."</option>"; 
} 
echo "</select>"; 

?>
              </div></td>
            </tr>
            <tr>
              <td valign="top" class="formu_txt_1">&nbsp;</td>
              <td valign="top" class="formu_txt_1">Salida</td>
              <td><div align="left">
               <?php 
$ano=date("Y"); 
echo "A&ntilde;o:"; 
echo "<select name='ano'>"; 
for($i=2008; $i<=2011; $i++){ 
    echo "<option value='".$i."' "; 
    if($ano==$i){ 
        echo "selected"; 
    } 
    echo ">".$i."</option>"; 
} 
echo "</select>"; 

$mes=date("m"); 
echo "Mes:"; 
echo "<select name='mes'>"; 
for($i=1; $i<=12; $i++){ 
    echo "<option value='".$i."' "; 
    if($mes==$i){ 
        echo "selected"; 
    } 
    echo ">".$i."</option>"; 
} 
echo "</select>"; 

echo "Dia:"; 
echo "<select name='dia'>"; 
$dia=date("d"); 
for($i=1; $i<=31; $i++){ 
    echo "<option value='".$i."' "; 
    if($dia==$i){ 
        echo "selected"; 
    } 
    echo ">".$i."</option>"; 
} 
echo "</select>"; 


?>
              </div></td>
            </tr>
            <tr>
              <td colspan="3"><hr size='1' color='#D9ECFF' /></td>
            </tr>
          </table>
        <table width="608" border="0">
            <tr>
              <td><hr size='1' color='#D9ECFF' /></td>
            </tr>
            <tr>
              <td><div align="center"><span class="Estilo8">
                  <input name="enviar2" type="button" id="enviar2"  value="Siguiente" />
                  <input name="borrar2" type="reset" id="borrar2" value="Borrar" />
              </span></div></td>
            </tr>
          </table>
      </form></td>
    </tr>
  </table>
  <p>&nbsp;</p>
</div>
</body> 
__________________
paty :adios:

Última edición por niltza; 05/02/2008 a las 21:40