<? require("class.astro.php"); ?>
<html>
<head>
<title>Astrological signs</title>
</head>
<body>
<?
if($submit)
{
$person = new astro($date);
echo "The chaldean sign of $fname is " .$person->chaldeanSign. "<br>\n";
echo "The chinese sign of $fname is " .$person->chineseSign. "<br>\n";
}
else
{
echo "<form method='post' action='$PHP_SELF'>\n";
echo "Name:<br><input type='text' name='fname'><br>\n";
echo "Birthday (format: AAAA-MM-DD)<br><input type='text' name='date'><br>\n";
echo "<input type='submit' name='submit' value='Show astrological signs'>\n";
echo "</form>\n";
}
?>
</body>
</html>
|