<?php
include_once 'Plural.php';
?>
<html><body>
<?php
if(isset($_GET['word'])) {
    
$word $_GET['word'];
    
$p = new Pluralizer();
    if(isset(
$_GET['classical']))
        
$p->classical();
    if(
preg_match('/^\w+$/',$word)) {
        
$p_word $p->plural($word);
        echo(
"The plural form of <b>${word}</b> is <b>${p_word}</b>");
    } else {
        echo(
'Invalid word');
    }
}
?>
<br /><br />
<form action="./test_plural.php" method="GET">
    <b>Enter a singular word:</b><br /><br />
    <input type="checkbox" name="classical" id="classical" <?php if(isset($_GET['classical'])) echo('checked="checked"'); ?> /><label for="classical">Use Classical English</label><br />
    <input type="text" size="25" name="word" />
    <input type="submit" value="Pluralize" />
</form>
</body>
</html>