I don't understand who to use class in other file.
db.php is my Mysql Class and i want to use my mysql class in other file :
<?
require ("db.php");
$sql = new MySQL('vinizos_beta', 'root', 'root', 'localhost');
function show_all(){
$query = 'SELECT * FROM domaines';
$result = $sql->executeSQL($query);
$lastError = $sql->lastError;
print_r($result);
}
?>
But i have this error, and i don't know why ?
Undefined variable: sql