Ver Mensaje Individual
  #4 (permalink)  
Antiguo 09/05/2008, 13:07
Avatar de farra
farra
 
Fecha de Ingreso: marzo-2008
Ubicación: Aqui estoy
Mensajes: 574
Antigüedad: 16 años, 2 meses
Puntos: 20
Re: Mega Validacion de 2 fechas!

El Formulario:

Código PHP:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
.style1 {font-size: 12px}
-->
</style>
</head>

<body>
<form id="form1" name="form1" method="post" action="">
  <label>
  
  </label>
  <table width="90%" border="0">
    <tr>
      <td align="right">Iniciar:</td>
      <td align="left" class="style1"><label>
        <?
if(trim($_POST['fechaini']) != ""){ 
$fechacal=htmlentities($_POST['fechaini']);
}else{
$fechacal="Elejir Fecha >>";
}              

?><input type="text" name="fechaini" id="fechaini" value="<?php echo $fechacal?>" />
        </label>
          <label>dd/mm/yyyy</label></td>
    </tr>
    <tr>
      <td align="right">&nbsp;</td>
      <td align="left" class="style1"><?php if ($_POST['MM_Insert'] == "form1"){ ?>
<?php 
echo validarfechas($_POST['fechaini'],$_POST['fechafin'],"1",""); ?>
<?php 
?></td>
    </tr>
    <tr>
      <td align="right">Finalizar:</td>
      <td align="left" class="style1"><label>
        <?
if(trim($_POST['fechaini']) != ""){ 
$fechacal2=htmlentities($_POST['fechafin']);
}else{
$fechacal2="Elejir Fecha >>";
}

?><input type="text" name="fechaini" id="fechaini" value="<?php echo $fechacal?>" />
        </label>
          <label>dd/mm/yyyy</label></td>
    </tr>
    <tr>
      <td align="right">&nbsp;</td>
      <td align="left" class="style1"><?php if ($_POST['MM_Insert'] == "form1"){ ?>
<?php 
echo validarfechas($_POST['fechaini'],$_POST['fechafin'],"2",""); ?>
<?php 
?></td>
    </tr>
  </table>
  <p>
    <label>
    <input type="submit" name="button" id="button" value="Enviar" />
    </label>
    <input type="hidden" name="MM_Insert" id="MM_Insert" value="form1" />
  </p>
</form>
</body>
</html>
__________________
Firma:
Es mas dificil para el mono entender que el hombre desciende de el....

PD: Siempre doy karma al que me da una buena respuesta... ;0)