Comme je suis dans Linux, je voulais faire ça en cgi,
il y a peut être plus simple des fois ;)
Sinon en un fichier (toto.php)
<html>
<head></head>
<body>
<?
if ($_POST['soumis'])
{
$nb3=$_POST['nb1']+$_POST['nb2'];
echo $_POST['nb1']." + ".$_POST['nb2']." = ".$nb3;
exit();
}
?>
<form action='toto.php' method="post" >
nb1 :<input type="text" name="nb1" maxlength="250">
<br>
nb2 :<input type="text" name="nb2" maxlength="250">
<input type="submit" value="envoyer">
<input type="hidden" name="soumis" value="1">
</form>
</body>
</html>
j'ai testé, ça marche au poil ;)


