The most important piece of code you're missing is......
Quote:
|
mysql_query($sql) or die(mysql_error());
|
"or die(mysql_error())"
This will immediately output what the error is (if any).
When i tried your code on my server, it kept giving me a permission error.
I am using Linux, cpanel/whm, which has stricter security on databases and you cant easily create a database from the php/apache environment.
What are you trying to achieve? couldn't you create a table instead, inside of a master database?
Quote:
$sql = "CREATE TABLE Persons
(
FirstName varchar(15),
LastName varchar(15),
Age int
)
|