views:

38

answers:

1

I am trying to create a new db called testDB2, below is my code. Once running the script all I am getting an error on line 7

Fatal error: Call to undefined function mysqlquery() in /home/admin/domains/domain.com.au/public_html/db_createdb.php on line 7

This is my code

<?
$sql = "CREATE database testDB2";

$connection = mysql_connect("localhost", "admin_user", "pass")
    or die(mysql_error());

$result = mysqlquery($sql, $connection) 
    or die(mysql_error());

if ($result) {
    $msg = "<p>Databse has been created!</p>";
}
?>

<HTML>
<head>
<title>Create MySQL database</title>
</head>
<body>

<? echo "$msg"; ?>

</body>
</HTML>

UPDATE, now I get error

Access denied for user 'admin_user'@'localhost' to database 'testDB2'

what does this mean?

+2  A: 

The function is called mysql_query. Note the _

Ikke
thqanks lkke :)
Jacksta