The save, like, and dislike functions are mainly used in comments. Here we will make a simple mysql implementation based on jquery ajax and php. The source code download is attached at the end of the article.
php is used more and more widely, and in order to increase the richness of the website, many new technologies have emerged. Ajax is an indispensable technology in modern websites. It can refresh data asynchronously and achieve many effects, such as refreshing verification codes and the saving function in Weibo, all using this.
Rendering of this saving function:
Homepage file (index.php):
The code is as follows | Copy code | ||||||||||||||||||||||||||||
".$row['title']." < img src='finger.jpg'/>Save it (".$row['finger']." "; } ?> Processing ajax requests and configuration information file (finger_ajax.php):
//Save js
Previous article:PHP multi-process simple example program_PHP tutorial
Next article:PHP implements map area data statistics-ajax loading data_PHP tutorial
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Latest Issues
Group MySQL results by ID for looping over
I have a table with flight data in mysql. I'm writing a php code that will group and displ...
From 2024-04-06 17:27:56
0
1
406
Related Topics
More>
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
|