File: example.php

Recommend this page to a friend!
  Classes of Dannel  >  PHP Dog Age Calculator  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Dog Age Calculator
Convert the age of a dog a person equivalent
Author: By
Last change:
Date: 1 year ago
Size: 675 bytes
 

Contents

Class file image Download
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
  <title>My Dog | Human Age</title>
</head>

<body>

<?php
require("dogage.php");
if(isset(
$_POST['age'])){
$obj=new dogHumanAge;

$age=$obj->dogAge($_POST['age']);
echo
'Your Dog is <b><font color="#FF0000">'.$age['humanizedAge'].'</font></b> years old in human age.<br />';
echo
$age['message'];
}else{
?>
<form method="POST">
Please input your dog&apos;s age:<br />
<input type="number" name="age" />
<input type="submit" value="OK"/>
</form>


<?php } ?>
</body>

</html>

For more information send a message to info at phpclasses dot org.