A paging text-based PHP message board _ PHP Tutorial

Source: Internet
Author: User
A paging text-based PHP message board. The younger brother is a beginner in php (as the mainstream development language) and has compiled a message board program. he feels good about himself, so he put his face up. please correct me. The source code is as follows :? P's younger brother is new to php (as the mainstream development language). he compiled a message board program and felt good about himself, so he put his face up. please correct me. The source program is as follows:
// File name: guest. php (as the mainstream development language)
// Settings
$ Guestfile = "guest"; // record the text file of the message
$ Home = "index.html"; // return to the home page
$ Imagedir = "image"; // image file directory
$ Backimage = $ imagedir. "/bk.gif"; // background image
$ Backcolor = "# ceffff"; // background color, which takes effect when $ backimage = ""
?>


If ($ QUERY_STRING! = ""){
$ Page = $ QUERY_STRING;
} Else {
$ Page = 1;
}
If ($ mode = "add "){
$ Name = htmlspecialchars (trim ($ name ));
$ Title = htmlspecialchars (trim ($ title ));
$ Data = nl2br (htmlspecialchars ($ data ));
$ Data = str_replace ("r", "", $ data );
$ Data = str_replace ("x0A", "", $ data );
$ Data = str_replace ("", "", $ data );
If ($ data = "") $ data = "";
$ E_mail = trim ($ e_mail );
If ($ e_mail = "") $ e_mail = 0;
$ Url = trim ($ url );
If ($ url = "http: //" | $ url = "") $ url = 0;
$ Time = date ("Y "). "Year ". date ("m "). "Month ". date ("d "). "Day [". date ("H "). ":". date ("I "). ":". date ("s "). "]";
If ($ name = "" | $ title = ""){
Echo"

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.