Advertisement
Guest User

Untitled

a guest
Aug 28th, 2016
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.69 KB | None | 0 0
  1. <?php
  2.  
  3.  
  4. require 'includes/db.php';
  5. include "includes/header.php";
  6.  
  7.  
  8.  
  9. connectDB();
  10.  
  11. function afficherliens($email_client) {
  12.  
  13.   //$email_client = 'joyce@joyce.fr';
  14.   $table = 'dossier';
  15.   $dbh = connectDB();
  16.  
  17.   $req = "SELECT lien_dossier FROM $table WHERE email_client='$email_client'";
  18.  
  19.   $ret = $dbh->query($req)->fetchAll();
  20.  
  21.   echo "<pre>";
  22.  
  23.   var_dump($ret);
  24.   print_r($ret[0][1]);
  25.  
  26.  
  27.   echo "</pre>";
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36. }
  37. if ($_POST) {
  38.   if (!empty($_POST['mail']))
  39.     afficherliens($_POST['mail']);
  40. }
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50. ?>
  51.  
  52.  
  53. <h1> Mon espace </h1>
  54. <form action="clientspace.php" method="POST">
  55. <input type="email" name="mail">
  56. <input type="submit">
  57. </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement