<?php
if(isset($_POST['v'])){
require("extenso-pt.php");
$extenso = new extenso();
}
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>Teste para a classe de extenso</title>
</head>
<body>
<form method="post" action="test.php">
<input type="text" name="v" value="<?php echo isset($_POST['v']) ? $_POST['v'] : '';?>" />
<input type="submit" value="Extenso" />
</form>
<?php
if(isset($extenso)){
?>
<p><?php echo $extenso->calcular_extenso($_POST['v']);?></p>
<p><?php echo mb_strtoupper($extenso->calcular_extenso($_POST['v']), "UTF-8");?></p>
<p><?php echo ucwords($extenso->calcular_extenso($_POST['v']));?></p>
<?php
}
?>
</body>
</html>
|