Advertisement
Guest User

Untitled

a guest
Jul 31st, 2016
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. <?php
  2.  
  3. $conn_error = 'could not connect to the database';
  4.  
  5. $mysql_host = 'localhost';
  6. $mysql_user = 'root';
  7. $mysql_password = '';
  8.  
  9. $mysql_db = 'my_database';
  10.  
  11. @$conn = mysqli_connect($mysql_host, $mysql_user, $mysql_password);
  12.  
  13. if (!@mysqli_select_db($conn, $mysql_db) || !@$conn) {
  14. die($conn_error);
  15. }
  16.  
  17. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement