PHP + TEXT message book (1) _ PHP Tutorial

Source: Internet
Author: User
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:














...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.