html前端怎么连接数据库 PHP连接mysql数据库代码该怎么写啊?

PHP连接mysql数据库代码该怎么写啊?PHP代码连接三个MySQL数据库,我根据书写的,为什么不零连接?这段代码有什么问题<;PHP$host=localhost$user=root$pass

PHP连接mysql数据库代码该怎么写啊?

PHP代码连接三个MySQL数据库,我根据书写的,为什么不零连接?这段代码有什么问题<;PHP$host=localhost$user=root$password=77080520$dBASEuname=wei$conn=mysqluconnect($host,$user,$password)ordieError())echomysql server$host user name$user&Ltbr>mysqluselcetudb($dBASEuname,$conn)ordie(未能连接到mysql数据库uerror())echo数据库:$dBASEuname&Ltbr>echo成功连接到MySQL数据库?>mysqluuuselectudb($dbaseuname,$conn)ordie(无法连接到MySQL数据库uerror())