I have my first MySQL project and am stuck at the beginning with an error on the line that tries to connect to the MySQL database.
Here is the error I am getting:
And here is the first bit of my code including the line that is getting the error:
if (empty($_POST['first_name']) || empty($_POST['last_name']))
echo "<p>You must enter your first and last name! Click your browser's
Back button to return to the Guest Book form.</p>";
else {
$DBConnect = @mysql_connect("localhost", "root", "");
if ($DBConnect === FALSE)
echo "<p>Unable to connect to the database server.</p>"
. "<p>Error code " . mysql_errno()
. ": " . mysql_error() . "</p>";
Can anyone see what I'm doing incorrectly? I copied this right out of the book I'm working with and still get this error instead of the errors from the code.