13

Uncaught Error: Call to undefined function mysql_connect() in C:\xampp\htdocs\phoenixproject\register.php:9 Stack trace: #0 {main} thrown in C:\xampp\htdocs\phoenixproject\register.php on line 9

How to solve this??

Your Common Sense
  • 156,878
  • 40
  • 214
  • 345
Amar Muratović
  • 451
  • 2
  • 5
  • 11
  • 8
    Please [stop using `mysql_*` functions](http://stackoverflow.com/questions/12859942/why-shouldnt-i-use-mysql-functions-in-php). [These extensions](http://php.net/manual/en/migration70.removed-exts-sapis.php) have been removed in PHP 7. Learn about [prepared](http://en.wikipedia.org/wiki/Prepared_statement) statements for [PDO](http://php.net/manual/en/pdo.prepared-statements.php) and [MySQLi](http://php.net/manual/en/mysqli.quickstart.prepared-statements.php) and consider using PDO, [it's really pretty easy](http://jayblanchard.net/demystifying_php_pdo.html). – Jay Blanchard Jan 04 '16 at 20:27
  • Thanks :) It is better solution. – Amar Muratović Jan 04 '16 at 20:35

1 Answers1

5

It is most likely MySql extensions are not being loaded. Open your php.ini file and check if extension=php_mysql.dll and extension=php_mysqli.dll is uncommented

Stone Deft
  • 101
  • 2