Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Feb 2006
    Posts
    138
    Thanks
    11
    Thanked 0 Times in 0 Posts

    How to ask for approval before DB update

    If I have a simple HTML form, which through a PHP script inserts and updates records in a MySQL DB, how can I set it up where after form submission, the user would see all the form data displayed, where a "Are you sure the information is correct"? kind of prompt comes up to allow them to review the info and make confirmation before SQL update or insertion happens?

  • #2
    Regular Coder
    Join Date
    Dec 2005
    Posts
    346
    Thanks
    1
    Thanked 0 Times in 0 Posts
    This is a simple way of doing it. I don't know if it is the best way thou...

    Make the data post to page2.php....place the posted data into Hidden input boxes that are in a form & then echo the posted data in the page. Have 2 buttons at bottom of page...the Save or Submit & Go Back button. If the user likes the info display then when he clicks the Submit button then the hidden input boxes will post to the current processing script. Then the Go Back button is self explanatory.

    I would suggest not to use JavaScript to make a Prompt or anything pop up since it wouldn't work on browsers that doesn't support it or the user has JS disabled.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •