Advertisement
Guest User

oef 4

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