On Friday, April 29, 2011, ad...@buskirkgraphics.com wrote:

> Personally I would use the javascript page navigation is senseless if they
> miss click.
> Javascript: Small and simple javascript.

> onclick="return confirm('Are you sure you want to delete?')"

Personally, I'd use Javascript and also check that the form was
submitted after the client-side check. So something like a hidden
field ('jstest') in the client-side form that is set to 1 by the
onClick event prior to showing the confirmation box. Then in the
handling PHP:

if ($_POST['jstest'] == 1){
  // the client called us via Javascript::confirm, so we know the
  // use really wants to delete
} else {
  // We weren't called via Javascript::confirm, so we need to
  // handle the confirmation in PHP



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

Reply via email to