PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of bas   Number2Words   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: example
Class: Number2Words
Spell a number using English words
Author: By
Last change:
Date: 18 years ago
Size: 592 bytes
 

Contents

Class file image Download
<?php
   
include("number2word.php");
    if(
$_SERVER['REQUEST_METHOD'] == 'POST') {
       
$numStr = &new Number2Word($_POST['number']);
       
$number = $_POST['number'];
    }
?>
<html>
    <body>
        <form name="frm" action="<?php echo $_SERVER['PHP_SELF']?>" method="post">
        <table border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td>Enter the number</td>
                <td>:</td>
                <td><input type="text" name="number" value="<?=$number?>"></td>
            </tr>
            <tr>
                <td></td>
                <td colspan="2"><input type="submit" value="Convert"></td>
            </tr>
        </table>
        </form>
    </body>
</html>