I am experimenting with creating databases with PHP/MySQL, and I'm 99% sure I have the coding right. The hostname IS 'localserver' for my online account, so that doesnt need to be changed. Here's my code:
<html>
<head>
<title></title>
</head>
<body>
<?php
$create = @mysql_connect("localhost", "msimattt", "********");
if (!$create)
{ echo( "<P>Unable to connect to the " .
"database server at this time:" ); mysql_error() .
"</p>";}
mysql_create_db("CREATE DATABASE dumb");
if(@!mysql_create_db("dumb"))
{ echo("<P>Error creating database: " .
mysql_error() .
"</P>");}
if(mysql_create_db("dumb"))
{ echo "<p>Database created!"; }
?>
</body>
</html>
and this is the error I get:
mysql_error() = Access denied for user: 'msimattt@localhost' to database 'anything'
I was wondering if anyone had any comments. I have my name/pass correct, (i just deleted my pass) so that isnt it. Thanks for the help!