I am wondering if someone can offer my a suggestion for my database design.

I am trying to build a script that allows the admin to set up custom fields.

For example, i want to have a user table with as standard


but then in admin i want the admin to be able to add any field they want. So they could then go and add:

- Location
- Website

etc... (and also remove them).

I will then make the script build add.php forms based on the fieldnames in the table, all no problem.


what i also want is to be able to assign some "settings" to those custom fieldnames. "Required" is an obvious one as is "user_editable" (so that the admin can set a record which a user can't change).

Thing is, as far as the database design goes i have no clue how to do this.

A thought was having a table like

FieldID required user_editable

sort of thing, but how can i link up "fieldid" with the field from user? Is this even possible?

would be real grateful for suggestions to my little problem!