• Hi all,
    i’m building a new plugin and i’ve also created an admin page to easily set its options.
    Options are stored as an array in a single row in wp_options table.
    I’m checked two “strange” issues with checkboxes:

    1)if the checkboxes is uncheked the example pair
    [plugname_option] => 1
    is removed from the array instead of being given value “0” like
    [plugname_option] => 0

    2)checkboxes value are inserted as strings and not as integers into the DB so i have:
    s:15:”plugname_option”;s:1:”1″

    The checkbox code is like the following:
    <input type=”checkbox” name=”plug_options[plugname_option]” value=”1″ <?php check_option(‘plugname_option’); ?>/>

    Thanks in advance for your replies.

The topic ‘Plugins options questions’ is closed to new replies.