Cainiao's PHP notes (4)

Source: Internet
Author: User
Today, I started to read add. php. the add code is a little longer than the index .? Include (config. php); include (function. php); $ randrand (0,9999); random number. If ($ HTTP_POST_VARS [read add. php today, the add code is a little longer than the index.
Include ("config. php ");
Include ("function. php ");
$ Rand = rand (); // random number.
If ($ HTTP_POST_VARS ['action'] = "submit") {// do not quite understand this variable? Can I write Chinese directly?
$ Randc =$ _ REQUEST [randc];
$ Namecc =$ _ REQUEST [$ randc];
$ Content = $ _ REQUEST [content]; // the preceding three sentences do not know what to do.
$ Result. = checkuser ($ namecc );
$ Result. = checkemail ($ HTTP_POST_VARS ['email ']); // $ _ POST ['email']?
$ Result. = checkqq ($ HTTP_POST_VARS ['oicq']); //
$ Result. = checkcontent ($ HTTP_POST_VARS ['message']); //
$ Result. = checkkw ($ noword, $ HTTP_POST_VARS ['message']); //
If ($ result ){
Error ($ result); // use the function defined in funtion. php to confirm user information.
}
If (file_exists ($ dbtable )){
$ Fp = file ($ dbtable );
$ Num = count ($ fp) + 1;
} Else {
$ Num = 1;
}

$ Ip = getenv ("REMOTE_ADDR ");
$ Addtime = date ("Y-m-d H: I: s ");
$ Fp = fopen ("$ dbtable", "a + ");
$ Message = htmlspecialchars ($ HTTP_POST_VARS ['message']); //
If ($ ubb = 1 ){
$ Message = ubb ($ message );
}
// Echo $ message;
$ All = "$ num | chjia_com | $ _ POST [namecc] | chjia_com | $ _ POST [email] | chjia_com | $ _ POST [sex] | chjia_com | $ _ POST [oicq] | chjia_com | ";
$ All. = "$ _ POST [homepage] | chjia_com | $ ip | chjia_com | $ addtime | chjia_com | $ _ POST [phone] | chjia_com | $ _ POST [pw] | chjia_com | $ message \ n ";
@ Fputs ($ fp, $ all) or die (error ('Error when writing information! '));
Isok ("message added successfully! Please wait ...");

}

?>

The above is the content of Cainiao's PHP note (4). For more information, see PHP Chinese website (www.php1.cn )!

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.