<?php if (isset($_POST['_voir_soumission'])) { afficher_msg(); } else { afficher_formulaire(); } function afficher_msg() { print "<strong/>Bienvenu, ". $_POST['nom']; } function afficher_formulaire() { print<<<_HTML_ <form action="$_SERVER[PHP_SELF]" method="post"> Tapez votre nom: <input type="text" name="nom"> <br/> <input type="submit" value="Envoyer"> <input type="hidden" name="_voir_soumission" value="1"> </form> _HTML_; } ?> |
0