Programming > PHP + MYSQL

Saving user data to Wordpress database

(1/1)

Bofy:
Hi, everybody!

I am a beginner in coding and I want to write a plugin for my Wordpress blog but I didn't find any documentation.
I want to have a settings page to save my blog users options.

To be more clear:
I can create a page on admin menu,
I can make the plugin to save a global option that can be changed by all users,
I can add and save new fields on users profile page,
but I don't know the correct code for WordPress to save each user's option on admin menu page for my plugin.

I want to give each Logged In user the possibility to save and see the settings page with their individual options saved.

I've tried with get_user_meta, update_user_meta, get_user_option, update_user_option, get_option, update_option with user->ID and nothing worked.
 
I hope here somebody can give me an example of code that I can use for this function.

Thanks!

Navigation

[0] Message Index

Go to full version