Guest User

Untitled

a guest
Apr 24th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. <?php
  2. /*
  3. * connection.class.php
  4. */
  5. class connection {
  6. $mysql_hostname = 'localhost';
  7. $mysql_username = 'root';
  8. $mysql_password = 'password';
  9. $mysql_database = 'test';
  10.  
  11. function connect() {
  12. return mysql_connect(
  13. $mysql_hostname,
  14. $mysql_username,
  15. $mysql_password
  16. )
  17. or die(
  18. mysql_error()
  19. );
  20. }
  21.  
  22. function select_db() {
  23. return mysql_select_db($mysql_database);
  24. }
  25. }
  26. ?>
Add Comment
Please, Sign In to add comment