Re: Delete

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sunday 04 June 2006 03:11, Rabin Vincent wrote:
> On 6/4/06, Larry Garfield <larry@xxxxxxxxxxxxxxxx> wrote:
> > Make each button a separate form, with the id as a hidden value.  Like
> > so:
> >
> > <div>
> > <form method='post'>
> > <p>My first entry</p>
> > <input type='hidden' name='id' value='1' />
> > <input type='submit' value='Delete' />
> > </form>
> > </div>
>
> [snip]
>
> You may find it easier to generate links of the form
> delete.php?id=1, etc. Then you won't have to use a seperate
> form for each link. The id will be available in delete.php
> in $_GET. The same sanity checking applies in this case too.
>
> Rabin

Only  if delete.php is a confirmation page.  Never ever ever have a delete 
function that operates solely by GET.

Here's why: http://thedailywtf.com/forums/thread/66166.aspx

:-)

-- 
Larry Garfield			AIM: LOLG42
larry@xxxxxxxxxxxxxxxx		ICQ: 6817012

"If nature has made any one thing less susceptible than all others of 
exclusive property, it is the action of the thinking power called an idea, 
which an individual may exclusively possess as long as he keeps it to 
himself; but the moment it is divulged, it forces itself into the possession 
of every one, and the receiver cannot dispossess himself of it."  -- Thomas 
Jefferson

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux