timtamboy63
Active Member
Hey guys,
I decided I'd try to learn OOP PHP, and i've made a basic class to help me out when im dealing with database but I'm getting a wierd parse error.
Here's the relevant code:
the line thats giving me a parse error is:
(and no thats not the whole class)
edit: WORKED IT OUT.REPORTED FOR CLOSING :P
I decided I'd try to learn OOP PHP, and i've made a basic class to help me out when im dealing with database but I'm getting a wierd parse error.
Here's the relevant code:
PHP:
class Database {
protected $dbuser = 'Username';
protected $dbpass = 'Password';
protected $dbhost = 'localhost';
protected $dbname;
public $connection;
public $queryresult;
public $query;
public $numrows;
function Database($dbname){
//the constructor function
this->dbname = $dbname;
}
PHP:
this->dbname = $dbname;
edit: WORKED IT OUT.REPORTED FOR CLOSING :P