Guest User

Untitled

a guest
Apr 7th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. class DBconn {
  2.  
  3. var $host = 'localhost';
  4. var $user = 'user';
  5. var $pass = 'password';
  6. var $db = 'database';
  7.  
  8. function connectdb() {
  9.  
  10. $conn = @mysqli_connect($this->host, $this->user, $this->pass, $this->db);
  11. if(!$conn) {
  12. echo "There has been an error with the application: " . mysqli_error($conn);
  13. }
  14.  
  15. }
  16.  
  17. }
Add Comment
Please, Sign In to add comment