-1

Can anyone suggest how to solve this error in php "Fatal error: Uncaught Error: Call to undefined function mysql_connect()" ? I am using php 7.0.4 and php extension is mysqli.

nnnnnn
  • 123
  • 2
  • 2
  • 9
  • you are trying to connect by using mysql_connect() instade of mysqli_connect(). you are saying you had extension for mysqli then you should go for mysqli_connect(). – Hirendrasinh S. Rathod Apr 08 '16 at 04:22
  • [Searched the website yet](http://stackoverflow.com/a/35025964/4982088)? Has been answered dozens of times. I only raise my eyebrow that you think that mysql**i** refers to this error. – Xorifelse Apr 08 '16 at 04:33
  • I have changed the mysql_connect() function to mysqli_connect() but it is showing the same error. – nnnnnn Apr 08 '16 at 04:40
  • That means you need to enable the extensions in your php.ini – Xorifelse Apr 08 '16 at 18:03

2 Answers2

0

you are trying to connect by using mysql_connect() instade of mysqli_connect().

you are saying you had extension for mysqli then you should go for mysqli_connect().

0

You are using a PHP function that was removed on PHP 7

http://php.net/manual/en/function.mysql-connect.php

use mysqli_connect() instead.

http://php.net/manual/en/function.mysqli-connect.php

Aljay
  • 456
  • 7
  • 21