Advertisement
Guest User

Untitled

a guest
Jun 9th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.63 KB | None | 0 0
  1. <?php
  2.  
  3. //====================
  4.  
  5. $db_host = "localhost";            // The name of your SQL host
  6. $db_name = "mysite";            // The name of your database
  7. $db_user = "root";            // The database username
  8. $db_pass = "";                // The database password
  9.  
  10. //====================
  11.  
  12. // Connecting to the databse
  13. $con = mysql_connect( $db_host, $db_user, $db_pass );
  14.  
  15. // Selecting the database
  16. $db = mysql_select_db( $db_name, $con );
  17.  
  18. // Testing if the connections were made:
  19. if(!$con) { die("Could not connect to database."); }
  20. if(!$db) { die("Could not select database."); }
  21.  
  22. //====================
  23.  
  24. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement