title: Insert data into new table in WordPress plugin
body: <p>I am working on a plugin and I create new table with plugin installation, table created successfully.</p>
  
  <p>Now I want to add data in this new table. I create a form in "lsp_manage_foo.php" and write insert query in "lsp_manage_process.php". When I click on submit button I got the error:</p>
  
  <pre><code>Not Found
  
  The requested URL /lgs_pro/wp-admin/lsp_manage_process.php was not found on this server.
  Apache/2.2.15 (CentOS) Server at 192.168.2.2 Port 80
  </code></pre>
  
  <p>and in address bar the link is like that:</p>
  
  <pre><code>http://192.168.2.2/lgs_pro/wp-admin/lsp_manage_process.php
  </code></pre>
  
  <p>What is the issue?</p>
  
  <p>Here is my code:</p>
  
  <p>lsp_manage_foo.php:</p>
  
  <pre><code>&lt;form action="lsp_manage_process.php" method="post" name="lsp_add_foo"&gt;
      &lt;table width="100%" border="0" cellspacing="4" cellpadding="0"&gt;
          &lt;tr&gt;
              &lt;td width="25%"&gt;
                    &lt;label&gt;
                         foo Name
                    &lt;/label&gt;
              &lt;/td&gt;
              &lt;td width="58%"&gt;
                   &lt;input type="text" name="lsp_add_foo" id="lsp_add_foo" value=""&gt;
              &lt;/td&gt;
              &lt;td width="10%" align="right"&gt;
                   &lt;input type="submit" name="lsp_save_foo" value="Add Foo"&gt;
              &lt;/td&gt;
           &lt;/tr&gt;
       &lt;/table&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>lsp_manage_process.php:</p>
  
  <pre><code>&lt;?php
      global $wpdb;
      $foo_add = $wpdb-&gt;prefix."lsp_foo";
  
      $lsp_foo_name = stripslashes(strip_tags($_POST['lsp_add_foo']));
  
      $foo_shortcode = str_replace(" ", "_", $lsp_foo_name);
      $foo_shortcode = strtolower($foo_shortcode);
  
      $foo_data = array(
          'foo_name'       =&gt;  $lsp_foo_name,
          'foo_shortcode'  =&gt;  $foo_shortcode
      );
  
      $foo_insert = $wpdb-&gt;insert($foo_add,$foo_data);
  
      header("Location: lsp_manage_foo.php");
  ?&gt;
  </code></pre>