phpstudy mysql connection successful
navicat mysql connection phpstudy mysql no problem
The table is
id username gender pass
1 bule man 111
php里
conn. php file:
Connect to phpstudy database:
Use $link= mysqli_connect(); there is no problem in verification after connection
dologin.php file:
Define the query statement after calling conn.php:
$sql="select * from yq ";
Execute the query statement:
$ result= mysqli_query($link,$sql);
Then something goes wrong.
Problems arise when dologin.php imports conn.php. Just connect to the database directly in dologin.php. This is the sentence to quote a file in the same directory, right? include_once("./conn.php");
Then I guess you didn’t specify it in your library.