Advertisement
Guest User

Untitled

a guest
May 18th, 2017
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.56 KB | None | 0 0
  1. class database()
  2. {
  3.     private $db_host = 'localhost';
  4.     private $db_user = 'root';
  5.     private $db_pass = '';
  6.  
  7.     function connect()
  8.     {
  9.         // connect to mysql
  10.     }
  11.  
  12.     function query($sql)
  13.     {
  14.         // use open connection and run database query in $sql
  15.     }
  16.  
  17.     function close()
  18.     {
  19.         // close active mysql connection
  20.     }
  21. }
  22.  
  23. class users()
  24. {
  25.  
  26.     private $username;
  27.     private $whateverblegh;
  28.  
  29.     function register($username, $password, $salt)
  30.     {
  31.         // this function will register a new user, but it needs to use the MySQL class above to send queries to the database...
  32.     }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement