first off my php doesn't show any errors whatsoever. Even though setting for showing errors is E_ALL without any exceptions. whenever there is any error the page turns blank.
second I can't get mysql and php connected. I have tried every single code out there.. Nothing is working. I have even tried the W3C's tutorial. Mysql in my computer doesn't have any pass.. Default user is root.
Code: Select all
<?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);
?>