<!DOCTYPE html>
<html>
 <head>
     <meta charset="UTF-8" />
     <meta name="author" content="Manuele" />
    <title> Fonctions</title>
    <style>
         .droite { text-align : right ; font-style : italic; }
    </style>
 </head>
<body>

<?php 
    
function salutation $nom ) {
          
date_default_timezone_set("Europe/Paris");
          echo 
"<h1>Bienvenue, $nom ! </h1>";
          echo 
"<p class=droite>Aujourd'hui, nous sommes le " .date('d / m / Y'). "</p>" ;
    }
  
   if ( isset(
$_POST["client"]) AND ! empty($_POST["client"]) )    {   
         
salutation $_POST["client"] ) ;
    }
   else {
         
salutation ("cher client") ;
    }
    
?>
 
 <p>On peut appeler les fonctions autant de fois qu'on aura besoin. </p>
 
 <?php    
    salutation
("chers etudiants");
 
?>  

</body>
 </html>