PHP + TEXT message book (1 ). We all know the importance of databases for the network. due to the complexity of cgi, asp and php + MySQL have become the mainstream. almost all personal webpages use message Books. However, you know the importance of databases for the Internet. due to the complexity of cgi, asp and php + MySQL have become the mainstream. almost all personal webpages use message books, but the requested message books are unstable. this has caused a lot of inconvenience for online communication. therefore, more and more friends wish to have their own message Books.
However, few free personal homepages support asp and php. I recommend the Dynamic Site Guide (http://www.knowsky.com) for php now. this gives you the foundation to have your own message book. now, I will use an example in a text message book to describe the simple use of php.
First, let's determine the process of leaving a message: write, send, and view the message. (search) and so on. for bamboo, it is indispensable to manage message Books. in this way, we may wish to locate 6 PHP files and 1 text file. the six php files are: guest. php manage. php reply. php sys. php del. php edit. php, 1 text file: guest.txt
Let's take a look at the content of guest. php. of course, you can directly put the following content on your php webpage. please respect the work of the Author. thank you.
----------------------
// Guest. php:
Require ("sys. php ");
If ($ B1)
{
If ($ message = "" or $ name = "")
{
$ Errorm = "error !!! The name and message content are required ";
}
Else
{
# Writing data
$ Space = "";
$ Time = date (Y, m, d, H, I );
$ Ip = $ REMOTE_ADDR;
$ Name = encode ($ name );
$ Homepage = encode ($ homepage );
$ From = encode ($ from );
$ Email = encode ($ email );
$ Message = StripSlashes ($ message );
$ Message = htmlspecialchars ($ message );
$ Message = check_strlen_long ($ message );
$ Message = nl2br ($ message );
$ Guestcontent ="Message content: