<?
if(isset($submit)){
$year = date('Y');
$age = $year - $birthday;
echo $name."<br>";
         echo "您的年龄是".$age;
}
else{
?>
<form method=post action=<?echo $PHP_SELF?>>
        姓名:<input type="text" name="name"><br>
        出生:<input type="text" name="birthday"><br>
        <input type="submit" name="submit" value="提交">
</form>
<?
}
?>