Krista,
If you're using the default installation of MySQL (i.e. you haven't run a
grant statement to create a user), then you're script should have run. You
might want to try augmenting your connection statement with an error output
such as:
$linkID = mysql_connect("localhost","","") or die ('I cannot connect to the
database because: ' . mysql_error());
Tom
"Krista" <yw*****@hotmail.com> wrote in message
news:eb**************************@posting.google.c om...
Hi, I hope you guys can help me out~~~
when I run it localhost/config.php, it cannot display any message such
as connect successfully or failed. Do u guys have any idea?
config.php
<html>
<head><title>Create Database and table</title></head>
<body>
<?php
$linkID = mysql_connect("localhost","","");
print ("hello"); <---can print
Hello
if($linkID != "FALSE") <--i think
fail here
{
print("The connection to the server was made successfully.)";
}
else
{
print("The connection to the server failed");
}
mysql_close($linkID);
?>
</body>
</html>
am I right? do i need to put username and password in
mysql_connect("localhost","","")? i dont know where i can find it, or
how can I find it in mysql. Hope you guys can help me out~~ Thanks.
Krista