Advertisement
Guest User

Untitled

a guest
Jul 16th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. <html>
  2. <head>
  3. <title>PHP Test</title>
  4. </head>
  5. <body>
  6. <?php echo '<p>Hello World</p>';
  7.  
  8. // In the variables section below, replace user and password with your own MySQL credentials as created on your server
  9. $servername = "localhost";
  10. $username = "webuser";
  11. $password = "password";
  12.  
  13. // Create MySQL connection
  14. $conn = mysqli_connect($servername, $username, $password);
  15.  
  16. // Check connection - if it fails, output will include the error message
  17. if (!$conn) {
  18. die('<p>Connection failed: <p>' . mysqli_connect_error());
  19. }
  20. echo '<p>Connected successfully</p>';
  21. ?>
  22. </body>
  23. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement