Php+mysql The simplest message board
Remember to do your homework.
idnameemailcontent; $result = mysql_query (SELECT * from message), while ($row = Mysql_fetch_array ($result)) { echo; echo . $row [' id '].; echo . $row [' name '].; echo . $row [' email '].; echo . $row [' content '].; echo; } echo; mysql_close ($con);? >
Encounter a bug in the middle
Mysql_fetch_array (): supplied argument is not a valid MySQL result resource
When you navigate to the function, the value $result is not valid.
Suspect that the database is not connected successfully.
Judge $result, output mysql_error ();
The discovery is that there is no database selection.
Originally put on the local can be executed, originally placed on the site database name written form name.
http://www.bkjia.com/PHPjc/1047180.html www.bkjia.com true http://www.bkjia.com/PHPjc/1047180.html techarticle Php+mysql The simplest message board to learn the hands-on operation. idnameemailcontent; $result = mysql_query (SELECT * from message), while ($row = Mysql_fetch_array ($result)) {echo; ech...< /c5>