Hello,
I am new to PHP and struggling withe class inheritance.
Page name: DbConnectionClass.php
class DbConnectionClass{
protected $con;
protected function dbcon(){
$db = "abc";
$db_host = "localhost";
$db_user = "xyz";
$db_password = "******";
$this->dbCon =mysql_connect($db_host,$db_user,$db_password);
mysql_select_db($db);
}
}
Page name: LoginClass.php
include ("DbConnectionClass.php");
class LoginClass extends DbConnectionClass{
function loginuser($username,$password){
$this->dbcon();
-
-
-
mysql_close($this->con);
}
}
There seems to be some kind of problem with mysql_close statement and in general am I being wrong some where?
Thank you