Title: Simple questions &#8211;&gt; Custom Plugin   integration
Last modified: August 19, 2016

---

# Simple questions –> Custom Plugin integration

 *  [iperez_genius](https://wordpress.org/support/users/iperez_genius/)
 * (@iperez_genius)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/simple-questions-custom-plugin-integration/)
 * I have created a vary simple form that needs to write to the database.
 * 2 Things i need to do
    1. When the submit button is clicked write to the db 2.
   Add a link in the admin menu, either in the dashboard or otherwise so the form
   can be easily accessed.
 * here is my code so far
 *     ```
       <?php 
   
       /*
        Template Name: connect
        */
   
       if (isset( $_POST["flag"]))
       {
       global $wpdb;
       $id = $_POST["a"];
       $id2 = $_POST["b"];
   
       $query = "insert into wp_custom (id, id) values(".$id1.",".$id2.")";
       echo $query;
       $wpdb->query( $query );
       }else{
       //inside the function list_id is the form. the action for the form is to post to itself
       list_id();
   
       }
       ?>
       ```
   
 * If someone could help i would really appreciate it
    Ilan

Viewing 1 replies (of 1 total)

 *  Anonymous User
 * (@anonymized-3085)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/simple-questions-custom-plugin-integration/#post-1752915)
 * These should help:
    [Writing a Plugin](http://codex.wordpress.org/Writing_a_Plugin)
   [Plugin API](http://codex.wordpress.org/Plugin_API) [Plugin Resources](http://codex.wordpress.org/Plugin_Resources)

Viewing 1 replies (of 1 total)

The topic ‘Simple questions –> Custom Plugin integration’ is closed to new replies.

## Tags

 * [plugin integration](https://wordpress.org/support/topic-tag/plugin-integration/)

 * 1 reply
 * 2 participants
 * Last reply from: Anonymous User
 * Last activity: [15 years, 7 months ago](https://wordpress.org/support/topic/simple-questions-custom-plugin-integration/#post-1752915)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
