<html>
<head><title>Contador de caractéres - http://www.webtuga.com</title></head>
</html>
<body>
<form method="post">
Introduza a palavra:<br />
<input name="letra" type="text"><br />
<input name="submeter" type="submit">
<?php
if(isset($_POST[\\'submeter\\']))
{
if ($_POST[\\'letra\\'] == $null)
{
echo \\'Não foram introduzidos nenhuns dados!\\';
}
else
{
$nome = $_POST[\\'letra\\'];
echo "A frase tem " . strlen($nome) . " letras incluindo espaços.";
}
}
?>
</form>
</body>
</html>
Em php!