A simple php message board .... Built on sae... I set up a personal resume page on sae: If you are interested, visit & nbsp; workshop .. But the last simple php message board .... Built on sae...
I set up a personal resume page on sae: If you are interested, you can visit the http://671coder.sinaapp.com/
When I made the following simple message board, I got stuck for a long time, although I have never used php .. But it was barely written in the end...
The html on the home page is written as follows:
Contact Me This block can be hidden and only shown in a popup.
The verification code function has not been implemented yet...
Php in the background is written as follows:
《script》alert("Sorry, your name and your message can not be empty.");window.history.back(-1);《script》
";$mysql = new SaeMysql();$judge = true;for ($i=0; $i<10; $i++) {if (strpos($name, substr($m_notchar, $i, 1)) || strpos($message, substr($m_notchar, $i, 1)))$judge = false;}if( $mysql->errno() != 0 ) {die( "Error:" . $mysql->errmsg() );} else if (!$judge) {?>《script》alert("Sorry, your message has illegal characters, please re-enter checked.");《script》
runSql( $sql );?>《script》alert("Thank you for your message!");《script》
closeDb();?>《script》window.history.back(-1);《script》
Then the message board is shown as follows:
My messages
671coder's message:
"; While ($ r = mysql_fetch_array ($ result) {$ idx = $ r [" MId "]; $ user = $ r [" MName "]; $ text = $ r ["MText"];?>
- :
CloseDb ();?>
How about it! It feels so dazzling!
We all know how to design the database ?!