in reply to mysql: edit mutliple forms with one submit button

You could encode the field names for each record with the corresponding primary key from the database, e.g. ...name="firstname.10123" default="Pedro" ... name="firstname.12139" default="Lisa"...

If the checkbox indicates a record to be changed, grep over $query->param for the common part of the checkbox names to extract the primary keys to look for.

This will make for large queries. It may be worthwhile to cook up some javascript to weed out unchanged fields on the client side.

Caution, that is very insecure. It is only suitable for ssl connections with authentication for admin. If just anybody could use this, the keys could be forged with ease.

After Compline,
Zaxo

  • Comment on Re: mysql: edit mutliple forms with one submit button