PHP: Vérifier si l’utilisateur a rempli le formulaire à l’aide de ‘array_key_exists’

Author:

 formulaire
Download

<html>
<head>
 
</head>
<body>
 
<?php
if (array_key_exists('nom',$_POST))
{
    print "Bienvenu, ". $_POST['nom'];
}
else
{
?>
<form method="post" action="<?php print $_SERVER['PHP_SELF'];?>">
 
 
Votre Nom:
<input type="text" name="nom" />
<input type="submit" name="essayer" />
</form>
 
<?php
 
}
?>
 
</body>
</html>

Leave a Reply

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


+ 8 = thirteen