How do I write a selective execution statement?

Source: Internet
Author: User
My a.php page is the Edit content page, which is an ordinary edit, then submits the content to the database page, the approximate structure is as follows
。。。
$sql = "Update ' usercontents ' Set ....
。。。


I want to implement this function, when the user click the Modify button, then execute the following statement, such as no point to modify, then do not.

$myfile = "1.txt";
Unlink ($myfile);
echo "";
?>

After I insert the statement into the UPDATE statement, I can't seem to execute it. How do you write it? Thank you, great God!!!


Reply to discussion (solution)

Is anyone there? Did I say something a little bit around?

As soon as you click Edit, the a.php will be executed (not executed without clicking)
I don't know what you want.

Thank you xuzuning reply. A.php is the name of the edit page.
The front of the page is the normal edit, submit the form and so on. What I want to do is, after clicking on the changes, I can execute the code above.

I tried to put the code after the update, but it didn't seem to work, and when I put this piece of code at the bottom of the page, the code was executed as soon as the a.php was opened, but it was not achieved: the effect was clicked and then executed.

  • 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.