Advertisement
Guest User

Untitled

a guest
Feb 13th, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. <?php
  2.  
  3. $server= "localhost";
  4. $username= "";
  5. $password="";
  6. $db="";
  7.  
  8. try{
  9. $connection = new PDO("mysql:host=$server;dbname=$db", "$username", "$password");
  10. $connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
  11. echo "verbonden";
  12. echo "<br>";
  13. echo "<br>";
  14.  
  15. if(isset($_POST["save"]))
  16. {
  17. $naam = $_POST["naam"];
  18. $voornaam = $_POST["voornaam"];
  19. $klas = $_POST["klas"];
  20.  
  21. }
  22.  
  23. }
  24. catch (PDOException $error){
  25. die("Er is een probleem met de database.");
  26. $error->getMessage();
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement