All pastes #925489 Raw Edit

Someone

public text v1 · immutable
·published 2008-03-03 01:44 UTC
rendered paste body
<?php
class s0rscms {
	var $dbcon;
	function connectDB($host, $user, $pass){
		$this->dbcon = mysql_connect($host, $user, $pass);
		return $this->dbcon;
	}
	function selectDB($db){
		$selected = @mysql_select_db($db, $this->dbcon);
		return $selected;
	}
}
$s0rs = new s0rscms();
if($s0rs->connectDB("localhost", "web", "web")){
print "I can connect to the DB server @ localhost";
}
if($s0rs->selectDB("mysql")){
print " and I can select the mysql DB!";
}
?>