Form submit from wordpress plugin

var_dump() your $_POST, there will never be a [‘submit’]. You don’t have something like: <input name=”submit” type=”submit” /> That is basic HTML 😉 And read more about MVC and putting your HTML-Code in another file. Putting them in strings is something you won’t like in the future! It becomes unreadable and unmaintainable some day.

How can I retrieve data within my widget

Read: SELECT_a_Column $sql = “SELECT ‘liters’ FROM ” . $wpdb->prefix . “tfp”; $liters = $wpdb->get_col( $sql ); if( $liters ) { foreach( $liters as $liter ) { echo ‘<option value=”‘ . $liter . ‘”>’ . $liter . ‘</option>’; } }