Gossamer Forum
Home : Products : DBMan : Customization :

Cutting off the amount of forms an user can add.

Quote Reply
Cutting off the amount of forms an user can add.
I have the script running where a user can sign themselves up and then add, delete, and modify their own record. The problem is that I only want a user to be able to add one entry. I have tried to put in $per_add = 0; in the add-success function so that once an add is complete they cannot add again but they can modify and delete and if they delete they will have permissions to add again. It didn't work the way I tried. Do you have any ideas
Quote Reply
Re: Cutting off the amount of forms an user can add. In reply to
One very simple way to do it is to set the $db_key field to the name of your userid field. You will also need to set $db_key_track to 0. When the person adds a record, they will get a "duplicate key error."


------------------
JPD