Compiled PHP 7 missing mysql extension in WordPress
PHP 7 has removed mysql_* completely.
You need to use PDO or mysqli. Wordpress seems not to support this.
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:
<?php
$mysqli = new mysqli("localhost", "user", "password", "database");
if ($mysqli->connect_errno) {
echo "Failed to connect to MySQL: (" . $mysqli->connect_errno . ") " . $mysqli->connect_error;
}
?>
An example of pdo connection string:
<?php
$dbh = new PDO('mysql:host=localhost;dbname=test', $user, $pass);
?>
Note:
That mysqli example handles a connection error