0

I have made a frontend form for the admins where they can check a checkbox for each user and submit the form data by post.

For all the users that are checked, a value should be changed in a field in the database. The slug for this field could be payment_status.

What is a method to update or change the value of a field in the database for a specific user?

I have looked at a question like this: Update some database fields when post is saved

And have been trying with the options methods in wordpress.

But I have trouble finding the way to change the value for the specific user. When this is possible for me, it might not be difficult to convert this into repeating the update process for every checked user in the post data.

4
  • Have you seen the update_user_meta() WordPress function? Commented Sep 8, 2013 at 23:58
  • Thanks, @CharlesClarkson. Why didn't you post this as an answer?
    – Steeven
    Commented Sep 14, 2013 at 16:18
  • It was too short. Some moderator probably would have moved it to a comment. It has happened before. :) Did it help? Commented Sep 14, 2013 at 17:14
  • @CharlesClarkson Yep, that was what I had missed.
    – Steeven
    Commented Sep 16, 2013 at 19:19

1 Answer 1

1

Have you seen the update_user_meta() WordPress function?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.