I'm using Mac OSX and I have MAMP installed, which is running my localhost server. However, there are some issues running the PHP code because the website keeps returning that there is an error when connecting to the server. I don't know what's wrong with this; maybe someone can help me out here.
PHP code:
<?php
$connection = mysql_connect("localhost", "user", "password") or die ("There was an error when connecting to the server");
mysql_select_db("topaz", $connection) or die ("There was an error when connecting to the database");
echo "
<body style='font-family: Helvetica Neue, Helvetica, Arial, sans-serif;'>
<div style='width: 80%; padding: 10px; border: 1px solid #000000; background-color: #ffffff;'>
<h1>Login</h1>
</div>
</body>
";
?>


