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

后端 未结 8 825
一向
一向 2020-11-22 10:41

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.

Fata

8条回答
  •  星月不相逢
    2020-11-22 11:10

    You can use mysqli_connect($mysql_hostname , $mysql_username) instead of mysql_connect($mysql_hostname , $mysql_username).

    mysql_* functions were removed as of PHP 7. You now have two alternatives: MySQLi and PDO.

提交回复
热议问题