mysql deprecated error


How to Solve MySQL extension is deprecated?

How To Slove the Mysql extension is Deprecated ? and What is Deprecated Error?

After PHP5 version updated mysql_connect() is updated with Mysqi_Connect().

if you used old version of MYSQL_CONNECT() for database it shows Deprecated Error
For Example

CODE FOR CONNECT in old version

$link = mysql_connect('localhost', 'user', 'password');
mysql_select_db('databasename', $link);

CODE FOR CONNECT in new version

$link = mysqli_connect('localhost', 'user', 'password', 'databasename');

Its look all database name also in same fields

In Old  mysql_query('CREATE TABLE `table`', $link); 
In New  mysqli_query($link, 'CREATE TABLE `table`');

Fast and Easy Solution
Suppress all deprecated warnings including them from mysql_*:

error_reporting(E_ALL ^ E_DEPRECATED);

Insert this code in the top of the php page.
If you have further questions: Just left them below in the comments
Enjoy Easy Coding