Q:

MAMP server error 500

While writing simple mysql_connect, I am getting server error. 
<?php

$hostname = "localhost";
$username = "root";
$password = "roo1t";

$databaseName = "alphacrm";

$dbConnected = mysql_connect($hostname, $username, $password);

?>

I tried to echo the status of $dbConnected with if block, but I think, am getting error due to mysql_connect.

A:

Try to change this line:
$dbConnected = mysql_connect($hostname, $username, $password);

to this:
$dbConnected = mysqli_connect($hostname, $username, $password);

