Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Description of DatabaseConnection
- *
- * @author JoRoe <TrinoxDevelopment>
- */
- class DatabaseConnection {
- var $username;
- var $password;
- function DatabaseConnection($vUsername, $vPassword)
- {
- $this->username = $vUsername;
- $this->password = $vPassword;
- }
- function openConnection()
- {
- $mysql_connect = mysql_connect('localhost', $username, $password);
- if ($mysql_connect == false)
- {
- die('Could not connect: ' . mysql_error());
- }
- }
- function closeConnection()
- {
- $mysql_close = mysql_close();
- if ($mysql_close == false)
- {
- die('Could not connect: ' . mysql_error());
- }
- }
- }
- ?>
Add Comment
Please, Sign In to add comment