Fatal error Call to undefined function mysql
This question already has an answer here:
use mysqli_connect() instead of mysql_connect()
mysql function is not suggest and it's already abandon
Use mysqli_*
functions. As you found mysql_*
functions have been obsolete and even dropped in newer php.
The new functions however differ that they get database connection as the first parameter. So the call should look like (or actually you can pass the db name as 4th parameter to mysqli_connect
function):
mysqli_select_db($db, 'register')
And the same for query etc.
链接地址: http://www.djcxy.com/p/26594.html上一篇: php7和mysql扩展
下一篇: 致命错误调用未定义的函数mysql