Add / update user meta with form?
-
Hey,
according to my current project i want that users can choose some categories they can post in. So i have a form with Checkboxes. Every Checkbox has the category-id as value and this values i want to add to the users meta.
Question 1: Does update_user_meta() also add them when thres no information yet so can i use update as default function or do i have to check first and then to decide add or update?
Question 2: Is it better to write a class-handler or should i do that few with normal functions? (im not that stable in classes yet :P)
Question 3: At the moment im testing all the functions and forms on a special page template file. Do i need an extra file for every step (form, form sending, error/success texts) or can i use one file only?
I know it would be better to put all the stuff in a custom plugin, but i dont know how to create an own plugin stable.
Thank you in advance
- The topic ‘Add / update user meta with form?’ is closed to new replies.