Re: Question on best practice for allowing edits of lists



Make each entry in the table a hyperlink with the querystring
containing a primary key reference.

<a href='edit_entry.php?id=1'>Edit This Entry</a>

On the edit_entry.php page read the primary key in and use it to find
the item you are wanting them to edit.

Using a form is also easy and just involves having a hidden variable
storing the primary key id in it.

In terms of which is best, I'd only use a form when I need lots of info
to be passed (such as on the edit_entry.php page where you will hae a
number of fields to update). Having a big grey button at the end of
each row will also detract from the text contained in the row so would
be less visually pleasing (especially 10 or so unerneath one another).

Either way is fine though, just a preference of mine.

Rick

.


Quantcast