I've written another plug-in for wordpress, On my main options page i have 3 tabs, after i click save, it updates my options, but when the page re-loads im on tab 1 of 3, were 3 = options page.
the options are still showing the old values, until i either refresh the page or click on another page and come back..
all i need is to update my options and return to options page, with the new options shown.. is there something im missing..? or is it just because im using the jQuery tabs? or should i flush something to get my new options to show?
kod aşağıda ..
Şerefe
HTML FORM
<form method="post" action="<?php echo $location ?>">
<?php wp_nonce_field('update-options'); ?>
<input name="wp_tracker_logit" type="checkbox" id="wp_tracker_logit" value="1" <?php if($wp_tracker_logIt == 1) { echo "checked='checked'"; }?> />
<input name="save" type="submit" class="button-primary" value="<?php _e('Save') ?>" />
<input type="hidden" name="wp_tracker_options_submit" value="1" />
</form>
PHP CODE
if ($_POST['wp_googlebot_tracker_options_submit'])
{
$wp_tracker_logIt_update = strip_tags( stripslashes($_POST['wp_tracker_logit'] ));
$wp_tracker_logFile_update = strip_tags( stripslashes($_POST['wp_tracker_logFile'] ));
$wp_tracker_emailIt_update = strip_tags( stripslashes($_POST['wp_tracker_emailIt'] ));
$wp_tracker_yourEmail_update = strip_tags( stripslashes($_POST['wp_tracker_yourEmail'] ));
if($wp_tracker_logIt_update == "") {
$wp_tracker_logIt_update = 0;
}
if($wp_tracker_emailIt_update == "") {
$wp_tracker_emailIt_update = 0;
}
update_option("wp_tracker_logIt", $wp_tracker_logIt_update);
update_option("wp_tracker_logFile", $wp_tracker_logFile_update);
update_option("wp_tracker_emailIt", $wp_tracker_emailIt_update);
update_option("wp_tracker_yourEmail", $wp_tracker_yourEmail_update);
}