Implement refresh-free comments through PHP+jQuery, including paging! ! Star ratings are also included. Friends who know a little bit about PHP and MYSQL can embed this function into their own PHP website!
Precautions for use and installation and debugging instructions:
If you want to add custom fields to the database, you need to pay attention to the following points. For example, when adding fields in demo.php, please do the following:
1. The for name of the label label must be consistent with the name and id in the input
2. In comment.class.php, add in the corresponding position (similar code)
if(!($data['test']=filter_input(INPUT_POST,'test',FILTER_CALLBACK,array('options'=>'Comment::validate_text'))))
{
//$errors['test']='';
}
3. In submit.php
Add the corresponding database list columns and field values to INSERTINTO.