Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. <?php
  2. 1: "die()" will exit the script and show an error statement if something goes wrong with the "connect" or "select" functions.
  3. 2: A "mysql_connect()" error usually means your username/password are wrong
  4. 3: A "mysql_select_db()" error usually means the database does not exist.
  5. */
  6. // Place db host name. Sometimes "localhost" but
  7. // sometimes looks like this: >> ???mysql??.someserver.net
  8. $db_host = "localhost";
  9. // Place the username for the MySQL database here
  10. $db_username = "root";
  11. // Place the password for the MySQL database here
  12. $db_pass = "f41fkY4O";
  13. // Place the name for the MySQL database here
  14. $db_name = "Local";
  15.  
  16. // Run the actual connection here
  17. mysql_connect("$db_host","$db_username","$db_pass") or die ("could not connect to mysql");
  18. mysql_select_db("$db_name") or die ("no database");
  19. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement