fatal error: uncaught error: call to undefined function mysql_connect()

Total
0
Shares

Php throws error fatal error: uncaught error: call to undefined function mysql_connect() when you use mysql_connect() function. This is because mysql_connect() is deprecated and no longer used. Instead, use mysqli_connect() or PDO functions.

Solution

Use mysqli_connect() –

mysqli_connect($hostname, $username, $password, $database)