Fatal error: Uncaught Error: Call to undefined function mysql_connect()

Demeteor :

I am trying to do a simple connection with XAMPP and MySQL server, but whenever I try to enter data or connect to the database, I get this error.

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

Example of line 22:

$link = mysql_connect($mysql_hostname , $mysql_username);
efik :

mysql_* functions have been removed in PHP 7.

You probably have PHP 7 in XAMPP. You now have two alternatives: MySQLi and PDO.

Additionally, here is a nice wiki page about PDO.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Uncaught Error: Call to undefined function mysql_connect() - WordPress Setup

Fatal error: Call to undefined function oci_connect() in Wamp

Uncaught Error: Call to undefined function mysql_connect()

Fatal error: Uncaught Error: Call to undefined function ereg_replace() PHP 7

Fatal error: Uncaught Error: Call to undefined function mb_detect_encoding()

Fatal error: Uncaught Error: Call to undefined function - have to use $this

In PHP 7.0 Fatal error: Uncaught Error: Call to undefined function json_encode()

Fatal error: Uncaught Error: Call to undefined function bcadd()

Fatal error: Uncaught Error: Call to undefined function wp_get_current_user()

Fatal error: Uncaught Error: Call to undefined function get_option()

Fatal error: Uncaught Error: Call to undefined function mysqli_connect() on Windows 10

Fatal error: Uncaught Error: Call to undefined function curl_version() - Localhost Dev

PHP nginx mysql: Fatal error: Call to undefined function mysql_connect() in /var/www-git/www1/api/credentials/mysql.php on line 12

Fatal error: Call to undefined function sqlsrv_connect()

php error:Call to undefined function mysql_connect()

PHP to Postgres - Fatal error: Call to undefined function pg_connect()

Fatal error: Call to undefined function

XAMPP - Fatal error: Call to undefined function mysql_connect()

PHP Fatal error : Call to undefined function mysql_connect()

Uncaught Error: Call to undefined function

PHP mysql error Call to undefined function mysql_connect()

Fatal error: Uncaught Error: Call to undefined function mysqli_connect()

Fatal error: Uncaught Error: Call to a member function

PHP Fatal error: Uncaught Error: Call to undefined function mssqli_fetch_assoc()

Fatal error: Uncaught Error: Call to undefined function mysql_close()

Fatal error: Uncaught Error: Call to undefined function redirect() PHP logout session

Fatal error: Uncaught Error: Call to undefined method why?

Fatal error: Uncaught Error: Call to undefined function header() - Beginner question

Fatal error: Uncaught Error: Call to undefined function get_header()