widget problem
-
i try to write very simple widget, everything was fine, yeah fine, it running well but when i put some code only for testing
print_r($_POST); it show nothing on widget control panel, and i try to echo $_POST[‘zoaw_pisc_title’];, it way show empty but update always successful, i don’t know what happen here?
function zoaw_postinsamecategory_control() { $options = $newoptions = get_option('zoaw_postinsamecategory'); if ( $_POST['zoaw_pisc_submit'] ) { $newoptions['title'] = strip_tags(stripslashes($_POST['zoaw_pisc_title'])); print_r($_POST); echo $_POST['zoaw_pisc_title']; } print_r($_POST); if ( $options != $newoptions ) { $options = $newoptions; update_option('zoaw_postinsamecategory', $options); } $zoaw_title = attribute_escape($options['title']); ?> <p> <label><?php _e('Title:'); ?></label> <input style="width: 200px;" name="zoaw_pisc_title" type="text" value="<?php echo $zoaw_title; ?>" /> </p> <input type="hidden" name="zoaw_pisc_submit" value="1" /> <?php }
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘widget problem’ is closed to new replies.