News list display, delete function PHP code
alert('删除成功');window.location.href='lists.php'"; }else{ echo ""; } } ?>
The above code is all the code to delete the display. Simply put, it is the operation of the database.
Many people will wonder why there are no codes displayed in the list, but only deleted ones. In the previous section, we talked about a loop statement. In fact, that loop has already displayed the database data on the list page.
First connect to the database, execute a query on the database, and pass the obtained value to the front-end page. Next is deletion, executing the statement to delete the database.