How to modify the database in php: first connect to the mysql database through the account and password; then modify the specified content of the database by executing the command "update users set..."; and finally judge the modification result.
The operating environment of this tutorial: Windows 7 system, PHP version 7.1, Dell G3 computer.
Recommended: "PHP Video Tutorial"
PHP Simple implementation of modifying data
index.php
可编辑表格DEMO update.php
" ; echo " id name 操作 ".$row['id']." "; echo "".$row['username']." "; $id=$row['id']; echo "修改 "; echo " "; } ?>可编辑表格DEMO
doUpdate.php
alert('修改成功'); location.href='index.php' "); }else{ exit(""); } ?>
For more programming-related knowledge, please visit:Introduction to Programming! !
The above is the detailed content of How to modify the database in php. For more information, please follow other related articles on the PHP Chinese website!