Error when php connects to mysql The mysql extension is deprecated and will be removed in the future

Copyright statement: produced by Yuge, it must be a boutique~~~ https://blog.csdn.net/zhongaiyisheng_/article/details/83626163

First
, the connection can be successful, but an error will be reported, The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead. . .
As follows:
insert image description hereThe meaning is obvious, mysql_connect will be deprecated in future php versions, let you use mysqli or PDO instead! Replace the code you connect to the database with
$link = mysqli_connect('localhost', 'user', 'password' ', 'dbname');

Related Posts