Skip to content
Snippets Groups Projects
Select Git revision
  • f9c23a7d0ffc8b824de06fff81bca9b7ab45c7b5
  • main default protected
2 results

ex6.php

Blame
  • SofianeLasri's avatar
    Sofiane Lasri authored
    4c2e4a1d
    History
    ex6.php 403 B
    <h1>Affichage de $_GET</h1>
    <?php
    echo "<pre>"; print_r($_GET); echo "</pre>";
    ?>
    
    <h1>Affichage des index de $_GET</h1>
    <?php
    echo "<pre>"; print_r(array_keys($_GET)); echo "</pre>";
    
    echo "<h1>Détection des clés prenom et nom</Affi></h1>";
    if(array_key_exists("prenom", $_GET)){
        echo "Prénom: " . $_GET['prenom'];
    }
    if(array_key_exists("nom", $_GET)){
        echo "<br>Nom: " . $_GET['nom'];
    }
    ?>