NYCPHP Meetup

NYPHP.org

[nycphp-talk] Preferred method for parsing multi-row submit buttons

Cliff Hirsch cliff at pinestream.com
Mon Nov 21 11:29:48 EST 2005


Ok, this is probably a trivial newbie questions, but here goes:

For a form that has multiple rows containing identical buttons for each
row, i.e. Edit row, Delete row, etc. what is your preferred scheme?

<input type="submit" name="submit_edit_$row_id" value="Edit"/>
<input type="submit" name="submit_delete_$row_id" value="Del"/>

I have also seen this:
<input type="submit" name="submit[$row_id]" value="Edit"/>
<input type="submit" name="submit[$row_id]" value="Del"/>

I have been using the first method, but #2 seems slightly easier to
parse. Pundits say #2 identifies the scripting language as PHP, but how
much is security by obscurity worth anyway.

Comments?




More information about the talk mailing list