Verifier si le champ requis a été saisi

Author:


Download

<?php
 
if (!strlen($_POST['nom']))
{
   print 'Le chmaps nom est obligatoire.';
}
?>
 
 <html>
 
  <head>
 
  </head>
 
  <body>
<form action ="<?php echo $_SERVER['PHP_SELF']; ?>" method = "post">
 
   Tapez votre nom complet:
<input type = "text" name = "nom">
<input type = "submit" value = "submit">
   </form>
 
  </body>
 
</html>

Leave a Reply

Your email address will not be published. Required fields are marked *


− 1 = two