Guest User

Untitled

a guest
Apr 12th, 2016
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.28 KB | None | 0 0
  1. <?php
  2. $server   = "localhost";
  3. $database = "database";
  4. $username = "user";
  5. $password = "password";
  6.  
  7. $mysqlConnection = mysql_connect($server, $username, $password);
  8. if (!$mysqlConnection)
  9. {
  10.   echo "Can't connect to database.";
  11. }
  12. else
  13. {
  14. echo 'Database connection works.';
  15. }
  16. ?>
Add Comment
Please, Sign In to add comment