Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Connection
- {
- #properties
- var $host;
- #username
- var $user ;
- #pass
- var $password ;
- #connection
- var $conn;
- fucntion __construct($h,$u,$pass)
- {
- $this -> host = $h
- $this -> user = $u
- $this -> password = $pass
- }
- #connect method
- function conenct()
- {
- $this -> conn = mysql_connect($host,$user,$password)
- if(!$this -> conn)
- {
- die("Could not connect to Database!".mysql_error())
- }
- return $this -> conn;
- }
- function close()
- {
- mysql_close($this -> conn);
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement