call to undefined function mysql_connect()

PHP
Try checking to see if the PHP MySQL extension module is being loaded:

<?php
    phpinfo();
?>

If it's not there, add the following to the php.ini file:

extension=php_mysql.dll

Save and Restart You Apache HTTP Serversudo apt install php-mysqliIn case, you are using PHP7 already, the formerly deprecated functions
mysql_* were removed entirely, so you should update your code using the
PDO-functions or mysqli_* functions instead.

If that's not possible, as a workaround, rubo77 created a small PHP include
file, that recreates the old mysql_* functions with mysqli_*()-functions:
https://github.com/rubo77/php-mysql-fix
Source

Also in PHP: