I have built PHP 7 with a configuration that worked for a previous version of PHP. Now my WordPress websites get the message:
Your PHP installation a
mysql_* functions got deleted in PHP 7.0 update your code to mysqli or PDO
Also take a look at prepared statements if you are handling user input. To reduce the chance of SQL injections
An example of mysqli connection string:
connect_errno) {
echo "Failed to connect to MySQL: (" . $mysqli->connect_errno . ") " . $mysqli->connect_error;
}
?>
An example of pdo connection string:
Note:
That mysqli example handles a connection error