I have installed 2 php topsite list scripts and created a MySQL db… I have changed the config.php files on both and they should work. But the problem is that they dont. The scripts throw up a lot of errors and problems and I am not a php programmer so any help on to what I can do would be great… Thanks…
I think that the error information in your site is very clear:
Notice: Undefined variable: dbhost in D:\hshome...
Notice: Undefined variable: user in D:\hshome\...
Notice: Undefined variable: pass in D:\hshome\...
It tells that your variables are undefined. So, where have you defined them?
You should have something like this:
<?
$dbhost = "mysql.jodoshared.com";
$user = "myuser";
$pass = "secret";
$dbname = "mysqldb";
$db = mysql_connect("$dbhost","$user","$pass") or
die ("Can't connect to mySQL server");
mysql_select_db ("$dbname") or die (mysql_error());
?>
Hmm, and the config.php is being included properly into the particular file? Because I don’t see how you cou could get that error message if it is..
There should be a [php]require_once(dirname(FILE) . ‘/config.php’);[/php]
line on top of the file. Alternative it could read include/include_once/require instead of require_once, and the path thing can differ of course.