PHP development...LOGIN

PHP development post comment function tutorial introduction

Have you expressed your opinions when browsing the news every day?

Have you ever posted your own comments when you saw your friends’ sentiments posted in QQ space?


comm.jpg


In this article, I will take you through using PHP, MySQL and jQuery to create a fast and efficient comment function. You can use this function in blog comments, product reviews, etc.


This tutorial uses the JQ plug-in and quotes the cdn from the Internet. Put the following code between the <head></head> tags and quote it without downloading

<script src="//cdn.bootcss.com/jquery/1.4.2/jquery.min.js"></script>

This article is a comprehensive knowledge application article, which requires you to have basic knowledge of PHP, jQuery, MySQL, html and css.


Create the PHP file we need

Receive the nickname and comment content parameters submitted by the front desk ajax, determine the legality of the parameters, and then insert the data into the database. If successful, output 1. Return to the frontend jQuery for processing. Read and generate JSON data, cooperate with the front-end ajax, and return the data to the front-end page
File nameindex.htmlcomment.phpserver.php




##The main function




Main page



Next Section

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>发表评论</title> </head> <body> <h1> 使用PHP,MySQL和jQuery创建一个快速高效的发表评论的功能 </h1> </body> </html>
submitReset Code
ChapterCourseware