<HEAD>
<TITLE>My first mySql</TITLE>
</HEAD>
<BODY>
<?
if(!($dbLink = mysql_connect("localhost", "root")))
{
print("Failed to connect to database!<BR>\n");
print("Aborting!<BR>\n");
exit();
}
if(!mysql_select_db("test",$dbLink));
{
print("Can't use the test database!<BR>\n");
print("Aborting!<BR>\n");
}
?>
</BODY>
I've been trying all morning trying to get PHP4 and mySql to work together. I can connect to my database(s) but the select command fails? Perhaps I have something configured wrong? I'm a newbie.
Software: Windoze98(yes, I know it sucks), latest versions of Apache, PHP and mySql installed.
PHP and Apache work fine together. I can test them thru localhost, over my LAN and over the net. I can also connect and use my database(s) in the DOS box on the command line. I've tried to use various databases and user names but none works thru the PHP scripts.
If you have any suggestions could you please also email me. Mindspring doesn't provide this group.
Regards,
Harry
hlrowe@mindspring.com