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 ";
}
}
?>