Advertisement
Guest User

Untitled

a guest
Sep 27th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. <?php
  2.  
  3. $conn = new mysqli($sql307.rf.gd, $rfgd_18815737);
  4. if ($conn->connect_error) {
  5. die("Connection failed: " . $conn->connect_error);
  6. }
  7. echo "Connected successfully";
  8.  
  9. create_dbs();
  10.  
  11. function create_dbs() {
  12.  
  13. $sql = "CREATE DATABASE TestDB";
  14.  
  15. if (mysqli_query($conn, $sql) === TRUE) {
  16. echo "New record created successfully";
  17. } else {
  18. echo "Error: " . $sql . "<br>" . $conn->error;
  19. }
  20. }
  21.  
  22. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement