Sunday, June 04, 2006

Adding a group to the database

Located at /php/addgroup.php. Mostly the same code as additem.php, so it works much the same.

Differences:

  • No url variable. You can send it, but it won't do anything.
  • No user variable. Instead, it's a comma-separated list called "members" in the format "members=member1,member2,member3" etc.
  • No usertypes variable. It too is a comma-separated list whose values may be "person" or "group". It can have a single item, in which case it will be applied to all items, or it must have the same number of items as members. If this is not the case, you'll get "var success = false; var errors = new Array ('Number of members and membertypes must be the same.');".


Note: some effort should probably be made somewhere to ensure that the creator is part of the members list.

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home