Guest User

Untitled

a guest
Mar 20th, 2019
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 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.  
  11. $statement = $conn->prepare("SELECT * FROM faker_users WHERE country= 'Belgium'");
  12. $statement->execute();
  13. $persons = $statement->fetchAll();
  14.  
  15. ?>
  16. <h1>Clients from Belgium</h1>
  17. <ul id="result_clients">
  18. <?php foreach($persons as $p): ?>
  19. <li><?php echo $p['firstName']." ".$p['lastName']; ?></li>
  20. <?php endforeach ?>
  21. </ul>
Add Comment
Please, Sign In to add comment