how can i add_option as array from a form with just a text input

Something like this should work. function si_ad_call_models() { if ( isset( $_POST[‘submit’] ) ) { // Checking that $_POST[‘new_model_name’] is set is probably not enough validation. if ( isset( $_POST[‘new_model_name’] ) ) { // Get the stored models. if ( get_option( ‘si_ad_call_model’ ) ) $si_ad_call_models = unserialize( get_option( ‘si_ad_call_model’ ) ); else $si_ad_call_models = array(); … Read more

‘all’ hook and get_option issue

get_option fires hooks itself so you are triggering a infinite loop (or something similar if not actually infinite). Your callback calls get_option, which triggers the hooks used by get_option. Each hook triggers the callback again, which used get_option which triggers the hooks used by get_option. And so on… Get your option value in the constructor, … Read more

Adding data to options table

This is an expansion of my comment on OP: function is_forum_subscribed($user_ID) { if($user_ID) { $useremail = $this->get_userdata($user_ID, ‘user_email’); $list = get_option(“mf_forum_subscribers_”.$this->current_forum, array()); if(in_array($useremail, $list)) return true; } return false; } } You can call this function like this, instead: is_forum_subscribed($player->ID);

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)