Advertisement
irfanamir

config.php

Nov 12th, 2020
284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.47 KB | None | 0 0
  1. <?php
  2. /* Database credentials. Assuming you are running MySQL server with default setting (user 'root' with no password) */
  3.  
  4. define('DB_SERVER', 'localhost');
  5. define('DB_USERNAME', 'root');
  6. define('DB_PASSWORD', '');
  7. define('DB_NAME', 'crud');
  8.  
  9. /* Attempt to connect to MySQL database */
  10. $link = mysqli_connect(DB_SERVER, DB_USERNAME,DB_PASSWORD, DB_NAME);
  11.  
  12. // Check connection
  13. if($link === false){
  14.     die("ERROR: Could not connect. " . mysqli_connect_error());
  15. }
  16. ?>
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement