Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.69 KB | None | 0 0
  1. <?php
  2.  
  3. /**
  4.  * @author UnknownKind
  5.  * @copyright 2010
  6.  */
  7.  
  8. class CMS
  9. {
  10.     private $connection;
  11.    
  12.     function __construct()
  13.     {
  14.         $this->MysqlConnect('localhost','killa_ki4234234llavb','FUCKYOU','killa234_vb4');
  15.     }
  16.    
  17.     public function MysqlConnect($host='',$user='',$password='',$database='')
  18.     {
  19.         $this->connection = mysql_connect($host,$user,$password);
  20.        
  21.         if(!$this->connection)
  22.         {
  23.             die(mysql_error());
  24.         }
  25.        
  26.         if(!mysql_select_db($database,$this->connection))
  27.         {
  28.             die(mysql_error());
  29.         }
  30.        
  31.         return $this->connection;
  32.     }
  33. }
  34.  
  35. $cms = new CMS();
  36.        
  37. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement