PHP Classes

File: astrotest.php

Recommend this page to a friend!
  Classes of Pierre FAUQUE   Astro Class   astrotest.php   Download  
File: astrotest.php
Role: Example script
Content type: text/plain
Description: PHP script to test the class
Class: Astro Class
Determine the zodiacal signs for a given date
Author: By
Last change:
Date: 18 years ago
Size: 640 bytes
 

Contents

Class file image Download
<? 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>