亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

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="http://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



Continuing Learning
||
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>發(fā)表評(píng)論</title> </head> <body> <h1> 使用PHP,MySQL和jQuery創(chuàng)建一個(gè)快速高效的發(fā)表評(píng)論的功能 </h1> </body> </html>
submitReset Code