ahi un codigo listo para funcionar con el formulario y todo...
Código PHP:
<?php
$Fecha=htmlentities($_GET['fecha']);
if($Fecha != ""){
$dia=date("d", strtotime($Fecha));
$mes=date("m", strtotime($Fecha));
$ano=date("Y", strtotime($Fecha));
$diasasumar=htmlentities($_GET['diasum']);
$fechaprox = mktime(0, 0, 0, $mes , $dia+$diasasumar, $ano);
$fechagenerada = strftime("%Y-%m-%d",$fechaprox);
}
?>
<form name="form1" method="GET" action=""><p>Fecha:
<label>
<input type="text" name="fecha" id="fecha" value="2008-02-29">
</label>
<br />
</p>
<label>
Dias a Sumar:
<input name="diasum" type="text" id="diasum" value="1" size="3" maxlength="3">
</label>
<label>
<input type="submit" name="button" id="button" value="Genera Fecha">
</label>
</form><br />
<p>Fecha Generada: <?php echo $fechagenerada ?> </p>