I have this in my index.php
include ('php/config.php');
$connection = new db();
$connection->connect();
the class (in a file called config.php) looks like this:
<?php
//CONECTION CLASS
class db
{
var $host="localhost";
var $username="root";
Var $password="";
var $database="training";
public function connect()
{
mysql_connect($this->host,$this->username,$this->password);
mysql_select_db($this->database)or die(mysql_error());
$sql = "SHOW TABLES";
$result = mysql_query($sql);
return true;
}}
It doesnt show the tables? if I do normal procedural code its fine and shows the 10 tables in my database?
how can I make this work please?
Many Thanks