I am trying to update options in wp_options table through admin panel.
$default_options=array(
'fb_url'=>'',
'tw_url'=>'',
'gp_url'=>'',
'layout'=>'',
'post_banner'=>'',
'top_banner'=>'',
);
add_option('thm_options',$default_options);
function theme_settings_page(){
$url="";
if(isset($_POST['fb_url']))
{
$url=$_POST['fb_url'];
}
update_option('fb_url',$url);
?>
<form method="post">
Fb url:<br>
<input type="text" name="fb_url"><br>
<?php submit_button(); ?>
</form>
<?php
}
I want to update fb_url. But i am getting a new entry instead of update in wp_options table.