Advertisement
MorpheusArch

Check MySQL Connection PHP Script

Nov 9th, 2015
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.53 KB | None | 0 0
  1.  /* Copyright (C) Mark Chisholm <http://morpheusarch.co.uk> 09-11-2015 (DD-MM-YYYY)
  2.    All rights reserved.  Permission granted to freely redistribute and update
  3.    as long as this Copyright notice is preserved.  No warranty expressed or
  4.    implied.*/
  5.  
  6. <?php
  7. $link = mysql_connect('localhost', 'account', 'password'); /*replace "account" & "password" with the details of MySQL Database this will not show up in browsers*/
  8. if (!$link){
  9.     die('Could not connect: ' .mysql_error());
  10. }
  11. echo 'connected successfully';
  12. ?>
  13. mysql_close($link);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement