PHP Classes

File: e2.values.php

Recommend this page to a friend!
  Classes of Nigel Johnson   Date Chooser   e2.values.php   Download  
File: e2.values.php
Role: Example script
Content type: text/plain
Description: example 2 frame HMTL
Class: Date Chooser
Outputs a calendar to let the user choose a date
Author: By
Last change:
Date: 20 years ago
Size: 687 bytes
 

Contents

Class file image Download
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<?php
function monthName($mon)
{
    static
$month_name = array(
       
'--UNDEFINED--'
       
,'January'
       
,'February'
       
,'March'
       
,'April'
       
,'May'
       
,'June'
       
,'July'
       
,'August'
       
,'September'
       
,'October'
       
,'November'
       
,'December'
   
);
    return
$month_name[$mon];
}

?>
<html>
<head><title>Calandar Chooser</title>
<link rel="stylesheet" href="chooser.css" type="text/css">
</head>
<body><center>
<?php
   
if($day>0)
    {
        echo
"<br><hr width=\"50%\"><br>";
        echo
"Date Selected: <b>".monthName($mon)." $day, $yr</b><br>\n";
        echo
"<br><hr width=\"50%\"><br>";
    }
?>
</center></body>
</html>