• Sers,

    im started to write my own WordPress Plugin. Im new at PHP but i know how to program things. If done a Plugin and it works but i have one Problem. If i want to update my Values in the Database i have to use a Submit_Button() and i dont know how to use it right. The button do no action and i have no idea how i link it to a function. Hope you guys can help me. Here is my code :

    function show_ff_cr_Menu(){
    	if ( !current_user_can( 'manage_options' ) )  {
    		wp_die( __( 'Du hast keine Berechtigung zur bearbeitung dieses Plugins' ) );
    	}
    	global $wpdb;
    
    	$prefix = $wpdb->prefix;
    	$table_name = $prefix . 'class_recruitment';
    
    	$class = $wpdb->get_results("SELECT * FROM $table_name", ARRAY_A);
    	echo '<br><h1>CLASS RECRUITMENT :</h1>';
    
    	$output = '<form><ul>';
    
    	foreach( $class as $entry){
    			$checked = '';
    		if ($entry["CLASSSTATUS"] == 1){
    			$checked = 'checked';
    		}
    		$output .= '<li>' . $entry["CLASSNAME"] . ' : <input type="checkbox" name="' . $entry["CLASSNAME"] . '" value="' .  $entry["CLASSID"] .'" user=""  to="post" '. $checked . '/></li>'  ;
    	}
    	$output .= '</ul>' . submit_button() . ' </form> ';
    	echo $output;
    }

    My goal is if use the button i update the values from checkboxes to the databases.

    greedings,

    ES Dean

    …. excuse my bad english =)

  • The topic ‘Action on Submit_Button()’ is closed to new replies.