Title: Action on Submit_Button()
Last modified: August 21, 2016

---

# Action on Submit_Button()

 *  [ES Dean](https://wordpress.org/support/users/es-dean/)
 * (@es-dean)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/action-on-submit_button/)
 * 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.

## Tags

 * [how to use](https://wordpress.org/support/topic-tag/how-to-use/)
 * [submit_button](https://wordpress.org/support/topic-tag/submit_button/)

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 0 replies
 * 1 participant
 * Last reply from: [ES Dean](https://wordpress.org/support/users/es-dean/)
 * Last activity: [12 years, 5 months ago](https://wordpress.org/support/topic/action-on-submit_button/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
