Guest User

Untitled

a guest
Jun 26th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <body>
  4.  
  5. <?php
  6. $servername = "localhost";
  7. $username = "fabian";
  8. $password = "XXX";
  9. $dbname = "music";
  10.  
  11. // Create connection
  12. $conn = mysqli_connect($servername, $username, $password, $dbname);
  13. // Check connection
  14. if (!$conn) {
  15. die("Connection failed: " . mysqli_connect_error());
  16. }
  17. else echo "everything fine";
  18.  
  19. mysqli_close($conn);
  20. ?>
  21.  
  22. </body>
  23. </html>
  24.  
  25. <!DOCTYPE html>
  26. <html>
  27. <body>
  28.  
  29. everything fine
  30. </body>
  31. </html>
  32.  
  33. Connection failed: Access denied for user 'fabian'@'localhost'
Add Comment
Please, Sign In to add comment