PHP + MySQL modification record method, phpmysql modification record _ PHP Tutorial

Source: Internet
Author: User
PHP + MySQL modification record method, phpmysql modification record. PHP + MySQL modification record method. phpmysql modification record this article describes the PHP + MySQL modification record method. Share it with you for your reference. Details: Copy the code as follows: PHP + MySQL modification record method, phpmysql modification record

This article describes how to modify records in PHP + MySQL. Share it with you for your reference. The details are as follows:

The code is as follows:


Modify record
<? Php
If (isset ($ _ POST ['btnmodify']) {
// Verification form omitted
$ SQL = "UPDATE animal SET WHERE ID = '$ _ POST [id]'";
$ Result = mysqli_query ($ SQL); // execute the update
If ($ result ){
Echo "modification successful! ";
}
Else
{
Echo "failed to modify! ";
}
}
// Query the current record
$ Query = "SELECT * FROM symbols ";
// Execute this query
If ($ result = $ mysqli-> query ($ query )){
// Display the number of returned record sets
If ($ result-> num_rows> 0 ){
// If a record exists
// Display the content of columns in the record set
Echo"















I hope this article will help you design the php + mysql program.

The example in this article describes how to modify records in PHP + MySQL. Share it with you for your reference. The code is as follows...

";While ($ row = $ result-> fetch_array ()){Echo" ";Echo" ";Echo" ";Echo" ";Echo" ";Echo" ";}}// Release the memory occupied by the object$ Result-> close ();}?>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.