Advertisement
Guest User

Untitled

a guest
Mar 24th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. <?php
  2. // WIJZIG ENKEL CODE IN HET PHP BLOCK
  3. // SQL CONNECTION DETAILS:
  4. // server: localhost
  5. // user: faker
  6. // password: SG3wyi0SbGGz2&KLb
  7. // database: www.professormode.com
  8.  
  9. $conn = new PDO('mysql:host=localhost; dbname=www.professormode.com', 'faker', 'SG3wyi0SbGGz2&KLb');
  10. $statement = $conn->prepare("select * from faker_users where country = :country");
  11. $statement->bindValue(':country', 'Belgium');
  12. $statement->execute();
  13. $res = $statement->execute();
  14.  
  15.  
  16. $arrayresult = $statement->fetchAll();
  17.  
  18.  
  19.  
  20.  
  21. ?>
  22. <h1>Clients from Belgium</h1>
  23. <ul id="result_clients">
  24. <!-- <li>Firstname Lastname</li> -->
  25. <?php foreach ($arrayresult as $result) : ?>
  26. <li><?php echo $result->firstName ?></li>
  27. <?php endforeach; ?>
  28. </ul>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement