The great God help you to guide. Little Brother Beginner PHP and database connection
Reply to discussion (solution)
What's wrong with the report?
What's wrong with the report?
Which means the 8th line of code is wrong
The error message is posted, the code is also best to paste the text out.
The error message is posted, the code is also best to paste the text out.
Well. Now I've turned off the computer. It's only tomorrow morning.
127.0.0.1 Change to localhost
Delete the blank in front of the $conn
Estimated to be full-width characters
Or maybe the mysql_connect function is undefined.
Because Phpmysqladmin uses the mysqli extension by default, you do not load the MySQL extension
127.0.0.1 Change to localhost
No way. I tried. I changed the SQL login password. It turned into a denial of access.
127.0.0.1 Change to localhost
No way. I tried. I changed the SQL login password. It turned into a denial of access.
phpMyAdmin The password of the link database inside the configuration file is wrong
What did you change the password to?
What did you change the password to?
There is no report of the mistake. Now that's it. I looked it up on the internet as if the PHP call mysql_connect () function handled an error. But I don't know how to change it.
$conn = mysql_connect ("localhost", "root", "") or Die ("database connection timed out, please try again later!");
mysql_select_db ("BBS", $conn);
mysql_query ("Set names ' UTF8 '");
$sql = "SELECT * from ' Student '";
$result = mysql_query ($sql);
?>
while ($row = Mysql_fetch_array ($result)) {?>
Name: |
Address: |
Phone: |
Age: |
Content:
|
}?>
The source code is like this
Yes, I told you, right?
You did not load the MySQL extension, so there is no definition for mysql_connect
Yes, I told you, right?
You did not load the MySQL extension, so there is no definition for mysql_connect
So what?
Ini
Extension=php_mysql.dll
Ini
Extension=php_mysql.dll
Add this sentence to the config file?
You don't even know what php.ini is?
You don't even know what php.ini is?
You know, yes.
Remove the previous # number
Every day a reply, happiness all day
Ini
Extension=php_mysql.dll
Add this sentence to the config file?
is to remove the word ";" from the front.