PHP Development Enterprise Website Tutorial Modification Contact Us Information
Let’s implement the modification function below
Query the information in the database through id , then display the information in the form, then modify the content of the form, click Modify, and implement the modification function
Let’s take a look at the code:
修改公司信息
As shown in the above code, click the modify button to pass the id, receive it on this page, query and display the information in the database based on the id
Modified After the content, the form is submitted to the modifyontact.php page
Let’s look at the code of the following modifyontact.php page:
alert('修改公司信息成功');location.href='contact.php'"; }else{ echo ""; } ?>
Get the form information, then write the updated statement and execute the sql statement Determine whether it is successful. If successful, we will complete the modification and jump to the display page. If the modification fails, we will return to the previous page