I hit this error when running a PHP script on XAMPP, in Windows. Does anyone know how solved it?
Fatal error: Call to undefined function mysql_connect() in C:\xampp\htdocs\netbanking\dbconnection.php on line 2.
I hit this error when running a PHP script on XAMPP, in Windows. Does anyone know how solved it?
Fatal error: Call to undefined function mysql_connect() in C:\xampp\htdocs\netbanking\dbconnection.php on line 2.
Try:
<?php
phpinfo();
?>
Create and call the page with above code and search for mysql. If not found, Do the following things.
Open your php.ini and
Changed from
;extension=php_mysql.so
into
extension=php_mysql.so
NOTE: mysql extension was deprecated in PHP 5.5.0, and it was removed in PHP 7.0.0. Instead, the MySQLi or PDO_MySQL extension should be used.