Re: Re: PHP delete confirmation
| From: | Ashley Sheridan | Date: | Fri, 29 Apr 2011 15:13:38 +0000 |
| Subject: | Re: Re: PHP delete confirmation | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-312571@lists.php.net to get a copy of this message | ||
"Jim Lucas" <lists@cmsws.com> wrote:
>On 4/29/2011 12:06 AM, Geoff Lane wrote:
>> On Friday, April 29, 2011, admin@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
>> }
>>
>> HTH,
>>
>
>It wasn't a form, it was an HTML <a> tag
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
I sure hope that's behind something a search engine can't find, otherwise you could find
yourself without a lot of things that it deleted as it follows all the links. I think I read a
couple of things similar to this on daily wtf...
Thanks
Ash
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.