You are here: Re: Avoid 'GET' method « PHP Programming Language « IT news, forums, messages
Re: Avoid 'GET' method

Posted by Gordon Burditt on 07/18/05 21:49

>> Is there a way to make a text link post
>
>no, you can't make a link *do* anything.

Yes, you can, but it's debatable as to whether it's a good idea.
For example, you might have a link labelled 'Delete' next to
a listing for a user on the editusers.php page:
http://my.domain.com/admin/editusers.php?mode=delete&userid=7362
and clicking on it deletes the user in question. (Obviously some kind
of authentication is in use for this, and maybe it takes you to a
confirmation page).

I'd be interested in someone's idea for a solution to the general
problem: you have a table with possibly hundreds or thousands of
lines in it. You want to have several clickable things on *each
line* that do stuff to the item (say, a DNS record) in question
(edit, delete, disable, enable, whatever). I've been using GET
with links that have a mode variable and some kind of id variable.
Disadvantages: running linkchecker on this destroys the database,
given that it effectively clicks on every delete button.

I've considered using PUT with forms with hidden fields instead.
Disadvantages: (a) the submit buttons tend to be too darn big,
making viewing enough of the table at one time impossible, and (b)
browsers tend to run out of memory much faster with a thousand forms
rather than a thousand links, and (c) a page with lots of forms is
a lot longer in HTML than a page with lots of links, making load
times noticible.

Gordon L. Burditt

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация