hi,
I am getting this error:
Parse error: syntax error, unexpected T_STRING in C:\xampp\htdocs\makedatabase.php on line 2
here is the code:
<?php
CREATE USER("jeffrey"@"localhost", IDENTIFIED BY "mypass");
$con = mysql_connect("localhost" ,"jeffrey","mypass");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
if (mysql_query("CREATE DATABASE my_db",$con))
{
echo "Database created";
}
else
{
echo "Error creating database: " . mysql_error();
}
mysql_close($con);
?>
I am a beginner in PHP please explain what I am doing wrong. the code above is coming from a tutorial but it does not want to work for me!