Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- class DatabaseConnect {
- private $host;
- private $username;
- private $password;
- private $table;
- private $database;
- public DatabaseConnect($host, $username, $password, $table) {
- $this->host = $host;
- $this->username = $username;
- $this->password = $password;
- $this->table = $table;
- }
- public function connect() {
- $db = mysql_connect($this->host,$this->username,$this->password) or die("Could not connect.".mysql_error());
- mysql_select_db($this->table) or die("Could not select Database.".mysql_error());
- $this->db = $db;
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement