How to modify sql in php: 1. Connect to the database and query the data; 2. Add data through the page addnews.html; 3. Through "mysql_query("UPDATE news SET title='$title'...) ” statement can be modified to update the data.
The operating environment of this article: Windows 7 system, PHP version 7.1, DELL G3 computer
How to modify sql in php?
PHP Mysql implements database addition, deletion, modification and query
PHP and Mysql can perform simple addition, deletion, modification and query on the database. This article introduces the news Backend management of the list.
https://github.com/caochangkui/php-mysql-test
Create A news list database:
Copy after login
新闻后台管理系统
The page is as shown:
Copy after login
Click the delete button, Delete through the server-side file action-del.php
Copy after login
Modify through the server-side file action-editnews.php [Recommended learning: "PHP Video Tutorial"]
Copy after login
The above is the detailed content of How to modify sql in php. For more information, please follow other related articles on the PHP Chinese website!