i'm a newby in xampp and mysql aswell. i installed xampp on my xp pro machine. as far as i could figure out up to now everything works perfectly. for instance: i can create databases and tables in phpmyadmin; i can enter data into them in phpmyadmin and i can search the database in the same surface.
the readme-file of xampp says that
With the preset values, you'll have to use the following syntax: mysql_connect("localhost","root","");
but when i use this action in php my page can't connect to the database. it doesn't return an error neither.
in my php-file i programmed the following to get at least any result:
function printError($errorMesg)
{
printf("<br> %s <br>\n", $errorMesg);
}
if (!($link = mysql_connect("localhost","root","")));
{
printError(sprintf("error connecting to host %s, by user %s", $host, $user)); exit();
}
when running the script, it answers;
error connecting to host localhost, by user root
i didn't change anything in the configuration of any of the programs in xampp.
the truth is out there, they say, thus i hope it will find its way here