Please what can i do to correct the error of this Fatal error


#1

Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /storage/ssd1/632/6410632/public_html/JobSeeker.php:172 Stack trace: #0 {main} thrown in /storage/ssd1/632/6410632/public_html/JobSeeker.php on line 172


#2

The php mysql_ extension was deprecated when php 5 was released (2004), where the two replacement extensions for it were introduced, started throwing deprecated errors in php 5.5 (2013), where the deprecated type error was added, and has been removed in php 7.x versions (2015).

All the database specific code will need to be rewritten to use one of the two replacement php extensions. The php PDO extension is the simplest and most consistent extension to use.

You will also want to use prepared queries when supplying data values to an sql query, with place-holders in the sql statement for each value, then supply the values when the query gets executed, and use exceptions to handle database statement errors. These two things actually simplify the overall sql syntax and php code, making it easier to convert older code, since you can just eliminate an amount of the existing sql syntax and php code rather than to have to convert it.


#3

yes PDO or MySQLi should be used instead since MySQL is no longer supported. As a stop gap sometimes you may need to run a site with mysql whilst you upgrade the site in those cases this library is really useful.

You can add the mysql-shim and the script will add support for mysql. Not meant for long term solutions but useful when you haven no choice to run mysql.