Advertisement
Guest User

Untitled

a guest
Sep 18th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. <?php
  2.  
  3. $user = "root";
  4. $password = "simas";
  5.  
  6. $db = new PDO('mysql:host=localhost;dbname=guestbook', $user, $password);
  7.  
  8. if ($db->getAttribute(PDO::ATTR_DRIVER_NAME) == 'mysql') {
  9. echo "Running on mysql; doing something mysql specific here\n";
  10. }
  11. $c = $db->exec("INSERT INTO page (name, text) VALUES('tmnt', 'mes vezliai')");
  12. echo $c;
  13.  
  14. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement