add_action( 'admin_menu', 'plugin_settings' );
function plugin_settings() { ÂÂ
  add_menu_page('plugin settings', 'my plugin', 'administrator', 'plugin_settings', 'display_settings');
}
function display_settings()
{
ÂÂ
 if (!current_user_can( 'manage_options' ) ) {
   wp_die( __(
    'You do not have sufficient permissions to access this page.'
   ) );
 }
ÂÂ
 $options_follow = get_option('ms_fbwall_plugin_follow_settings');  ÂÂ
 if((isset($_REQUEST["msfb_active_tab"]))&&($_REQUEST["msfb_active_tab"] == "4"))
   {             ÂÂ
     if((isset($_REQUEST["msfb_follow_setting"]))&&($_REQUEST["msfb_follow_setting"]=="Y")) {
    ÂÂ
     $msfb_followwidth=$_REQUEST["msfb_followwidth"]; $options_follow['msfb_followwidth']= $msfb_followwidth;
     $msfb_followid=$_REQUEST["msfb_followid"]; $options_follow['msfb_followid']= $msfb_followid;    ÂÂ
                                                                                                                        ÂÂ
     update_option( 'ms_fbwall_plugin_follow_settings', $options_follow );
     }
         ÂÂ
   }               ÂÂ
 $msfb_followwidth= ($options_follow['msfb_followwidth'] != '') ? $options_follow['msfb_followwidth'] : '480';
 $msfb_followid= ($options_follow['msfb_followid'] != '') ? $options_follow['msfb_followid'] : 'mridulcs';
  ÂÂ
 <form method="post" name="social_options" action="" class="form-horizontal"> ÂÂ
   <fieldset> ÂÂ
    <legend>follow button settings</legend>
    <div class="control-group"> ÂÂ
      <label class="control-label" for="msfb_followid">follow button id</label> ÂÂ
      <div class="controls"> ÂÂ
      <input type="text" class="input-xlarge" name="msfb_followid" value="<?php echo esc_attr_e($msfb_followid); ?>" id="msfb_followid" />
      </div> ÂÂ
    </div>
    <div class="control-group"> ÂÂ
      <label class="control-label" for="msfb_followwidth">follow button width</label> ÂÂ
      <div class="controls"> ÂÂ
      <input type="text" class="input-xlarge" name="msfb_followwidth" value="<?php echo esc_attr_e($msfb_followwidth); ?>" id="msfb_followwidth" />
      </div> ÂÂ
    </div> <br/>                                                                       ÂÂ
    <div class="form-actions">
     <input type="hidden" name="msfb_active_tab" value="4" />  ÂÂ
     <input type="hidden" name="msfb_follow_setting" value="Y" />                                                                          ÂÂ
      <input type="submit" name="submit" class="btn btn-primary" value="Update"/>  ÂÂ
    </div> ÂÂ
   </fieldset> ÂÂ
 </form>
ÂÂ
}
code details: in the above code summarization, it's apparently clear that
at first i get saved option array at $options_follow, then i check if the
options form(shown below) is submitted,if yes i again update options by
update_option. Proceeding further along the codes, i populated form values
with the saved option values.