Phpmysql message board code-PHP source code

Source: Internet
Author: User
Tags php mysql
This code is a simple php message board code. It saves the data submitted by the user to the mysql database and checks whether the user is an illegal user. It is very simple and suitable for beginners. This code is a simple php message board code. It saves the data submitted by the user to the mysql database and checks whether the user is an illegal user. It is very simple and suitable for beginners.

Script ec (2); script



// Php mysql message board code
$ Tp_time = $ other-> processing time ();
If ($ _ POST ['tp _ nam ']! = ""){
// ------- Add start -------------
$ Tp_name = $ _ POST ['tp _ nam '];
$ Tp_contents =$ _ POST ['message'];
$ At_id = $ _ POST ['at _ id'];
If (! Isset ($ _ POST ['chkkd ']) {
Exit ();
}

If ($ _ POST ['chkkd '] == _ SESSION ['codec']) {
$ _ SESSION ['codec'] = '';
$ Res = $ tpEdit-> tpInsert ($ tp_name, $ tp_contents, $ tp_time, $ at_id, $ col_id, 0, 0 );
} Else {
Echo "script" alert ('verification code input error'); window. location. href = 'www .111cn.net '; script ";
}
// ----------- Add end -----------
If ($ res = 1 ){
Echo "script" alert ('Operation successful! '); Window. close (); script ";
Exit ();
} Else {
Echo "script" alert ('do not repeat the post, come back in five minutes! '); Window. close (); script ";
}
}
?>

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.