<?php
function default_menu() {
<form action="options.php" method="post">
<?php settings_fields( \'sample_check\' );?>
<input type="checkbox" name="sample" value="nofollow"/>
</form>
function reg_setting() {
register_setting(\'sample_check\',\'???\');
}
大家好,我整天都在努力将复选框值存储到寄存器设置中。对于我使用的文本框:
<input type="text" name="sam" value="<?php get_option(\'samip\');?>" />
我还将值注册到寄存器设置中,如:
register_setting(\'sample_check\',\'samip\');
但我不知道如何对复选框执行此操作。如果有人能给我一个如何做这件事的建议,那就太好了。
谢谢vicky