Advertisement
Guest User

Untitled

a guest
Mar 25th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 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 firstName, lastName FROM faker_users WHERE country = Belgium'");
  11. $statement->execute();
  12.  
  13. ?>
  14. <h1>Clients from Belgium</h1>
  15. <ul id="result_clients">
  16.  
  17. <?php while($c = $statement->fetch(PDO::FETCH_OBJ)) : ?>
  18.  
  19. <li> <?php echo $c->firstName; ?> <?php echo $c->lastName; ?> </li>
  20.  
  21. <?php endwhile; ?>
  22. </ul>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement