[Solved] The following code returns an 500 error as the code is deprecited in php version 7, How to make it work in php verison 7?


Here’s a good tutorial about converting deprecated mysql_* PHP code to new mysqli_* code:

http://www.phpclasses.org/blog/package/9199/post/3-Smoothly-Migrate-your-PHP-Code-using-the-Old-MySQL-extension-to-MySQLi.html

In many cases, you simply need to change “mysql” to “mysqli” for each function call.

Remember to change them all!

solved The following code returns an 500 error as the code is deprecited in php version 7, How to make it work in php verison 7?