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 ();}?>