I want to add an options and a manage page for my plugin.
I am aware on the code to create this in WP Admin.
I've seen other plugins which have a few settings under the Options page
How do I do this so that I can set / update the variables that the functions in my plugin file uses.
I hope the question is clear.
WordPress provides a few plugin functions for saving and retrieving data in the options table:
http://codex.wordpress.org/Writing_a_Plugin#Saving_Plugin_Data_to_the_Database
Thanks Kaf, got the thing working after lots of trial and error!
Another question on this topic.
update_option($option_name, $newvalue);
How do I pass an Array as the value of $newvalue ??
$newvalue = array('hi', 'test', 'etc');
update_option($option_name, $newvalue);
or
update_option($option_name, array('hi', 'test', 'etc'));
Just like any php function.
So I assume I can even use $option_name = some_name and then use update_option