Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- * connection.class.php
- */
- class connection {
- $mysql_hostname = 'localhost';
- $mysql_username = 'root';
- $mysql_password = 'password';
- $mysql_database = 'test';
- function connect() {
- return mysql_connect(
- $mysql_hostname,
- $mysql_username,
- $mysql_password
- )
- or die(
- mysql_error()
- );
- }
- function select_db() {
- return mysql_select_db($mysql_database);
- }
- }
- ?>
Add Comment
Please, Sign In to add comment