Advertisement
hanane_nina

Untitled

May 12th, 2022
1,567
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.  
  3. <html lang="fr">
  4.  <head> <meta charset="utf-8"/>
  5. <title>Mon profil</title>
  6.  
  7.       <body>
  8. <h2 class="h2" ,align="center">Bienvenue a mon profile </h2>
  9. <div id="row">
  10. <img src="avatar2.png" alt="Avatar" style="width:20%"/>
  11.   <div class="btnRow">
  12.         <input type="submit"  name="edit" value="editer mon profile" class="ed" id="edited">
  13.   </div>
  14.  
  15.   <div class="btnRow">
  16.         <input type="submit" value="deconnexion" class="dec" id="deco">
  17.   </div>
  18.  
  19. <div id="container">
  20.  
  21. <ul>
  22. <?php
  23.  
  24. $nom_bdd = "artizana";
  25. $server = "localhost";
  26. $user = "root";
  27. $password = "";
  28.  
  29. $id = $_GET['id'];
  30. $connexion = new PDO("mysql:host=$server;dbname=$nom_bdd", $user, $password);
  31.  
  32. $requete_sql = "SELECT * FROM artisan WHERE id_artisan = ".$id;
  33. $result = $connexion->query($requete_sql);
  34. $afficher_profil = $result->fetch();
  35.  
  36.  
  37.  
  38.  
  39.  
  40. echo"
  41.    <li>Nom : ".$afficher_profil['nom']." </li>
  42.    <li>Metrier : ".$afficher_profil['type_artisan']." </li>
  43.    <li>ville: ".$afficher_profil['adresse']." </li>";
  44.  
  45.  
  46.  
  47.  
  48.  ?>
  49.  </ul>
  50.  
  51.  <table>
  52.        <?php
  53.              $requete_sql2 = "SELECT * FROM picture WHERE id_art = ".$id;
  54.             $result2 = $connexion->prepare($requete_sql2);
  55.             $afficher_public = $result2->fetch();
  56.             var_dump($afficher_public);
  57.               while( $afficher_public->fetch(PDO::FETCH_ASSOC)) {
  58.  
  59.                   echo"
  60.                       <tr> <td>".$afficher_public['contenue']."</td>
  61.                            <td>".$afficher_public['description']."</td>
  62.                       </tr>";
  63.                  
  64.               }
  65.  
  66.  
  67.        ?>
  68.  </table>
  69.         </div>
  70.   </div>
  71.  
  72. </body>
  73. </html>
  74.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement