I have wrote this class in php from scratch there is no copy paste or anything like that I tried to create a base class for my projects and know I don't know if this is good
Here is my code and I don't know how to use it I know this sounds verry dumm but that the way it is
Thank you in adavance for any help tips or other feedback
//Dany 26.06.2012
//Base Class
//@ to many
<?php
class baseClass {
//make them acessible to this class only
private $dbHost="";
private $dbUser="";
private $dbPass="";
private $dbName="";
private $dbCon="";
private $dbConError="";
private $dbNameError="";
//initialize the private var to be used with external ones
function __construct() {
parent::construct();
$this->dbHost=$dbHost;
$this->dbUser=$dbUser;
$this->dbPass=$dbPass;
$this->dbName=$dbName;
$this->dbCon=$dbCon;
$this->dbConError=$dbConError;
$this->dbNameError=$dbNameError;
$dbCon = mysql_connect($dbHost,$dbUser,$dbPass) or $dbConError = die("Can't connect");
mysql_select_db($dbName) or $dbNameError = die("No database selected");
}
//error display
function Error($dbError) {
if($dbConError) {
echo $dbConError;
}
if($dbNameError) {
echo $dbNameError;
}
if($errorSelect) {
echo $errorSelect;
}
else {
return false;
}
}
//select query
function select(){
$result = mysql_query("") or $errorSelect=die("The query dose not exist");
$num_rows = mysql_num_rows($result);
}
//display
function display($num_rows){
foreach ($num_rows as $key => $value) {
echo $nume_rows .'</br>';
}
}
}
?>