> Good day all,
> 
> I have a problem for you all..
> I have a form that has has the ability to delete a lot of information from
> my MySQL database.
> 
> I would like to create a bit of security, in case the user hits the button
> by accident.
> I would like to create an additionnal window that would appear that would
> ask:
> "Are you sure?" and then a "yes" and "no" buttons to confirm the deletion
> or
> to cancel the command.
> 
> Any thougts??

Hi Phil,

You can achieve this in several ways. One would be to use a JavaScript
onClick event on the 'dangerous' button to pop up a dialog with your 'Are
you sure?' prompt and the yes/no buttons. If the user clicks on the 'no'
button, you use JavaScript to cancel the page submission. If they click on
the 'yes' button, the page submits. This approach would mean assuming that
your users have JavaScript enabled.

A second approach would be to have an intermediary page between the page
with the button, and the page that performs the actual delete. The
intermediary page would be little more than another form with the yes/no
buttons.

Much warmth,

Murray
---
"Lost in thought..."
http://www.planetthoughtful.org

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to