Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class mysql{
- var $host;
- var $user;
- var $password;
- var $database;
- function connect(){
- mysql_connect($this->host,$this->user,$this->password) or die("error1");
- mysql_select_db($this->database) or die("error2");
- }
- }
- $mysql = new mysql;
- $mysql->host = "localhost";
- $mysql->user = "root";
- $mysql->password = "";
- $mysql->database = "balc";
- $mysql->connect();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement