So trying to make a database with php, however if I run my code I get just blank pages in both Firefox and Chrome?
Is there something I have to do in order to make php work?
<html>
<head>
</head>
<body>
<?php
$con=mysql_connect("localhost","root","");
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);
?>
</body>
</html>