mmmm io nn ne capisco molto... cmq
inserisco la data attraverso questi input:
codice:
<select name=giorno>
<?
for ($i=1; $i<=31; $i++)
if($i != $giorno){
echo "<option value=$i>$i";
}
else{
echo "<option value=$i selected>$i";
}
?>
</select>
<select name=mese>
<?
for ($i=1; $i<=12; $i++)
if($i != $mese){
echo "<option value=$i>$i";
}
else{
echo "<option value=$i selected>$i";
}
?>
</select>
<select name=anno>
<?
for ($i=2001; $i<=2030; $i++)
if($i != $anno){
echo "<option value=$i>$i";
}
else{
echo "<option value=$i selected>$i";
}
?>
</select>
Inoltre ho questo:
codice:
if(($mese == "2" and $giorno > "29") or ($mese == "4" and $giorno > "30") or ($mese == "6" and $giorno > "30") or ($mese == "9" and $giorno > "30") or ($mese == "11" and $giorno > "30") or ($mese == "2" and $giorno > "28" and $anno == "2001") or ($mese == "2" and $giorno > "28" and $anno == "2002") or ($mese == "2" and $giorno > "28" and $anno == "2003") or ($mese == "2" and $giorno > "28" and $anno == "2005") or ($mese == "2" and $giorno > "28" and $anno == "2006") or ($mese == "2" and $giorno > "28" and $anno == "2007") or ($mese == "2" and $giorno > "28" and $anno == "2009") or ($mese == "2" and $giorno > "28" and $anno == "2010")){
$data_error = "1";