title: wp_insert_post with a form
body: <pre><code>&lt;?php
  
  $submitted = $_POST['submit'];
  $post-title= $_POST['post_title'];
  $post-content= $_POST['post_content'];
  
  
  $new_post = array(
              'post_title' =&gt; '$post-title',
              'post_content' =&gt; '$post-content',
              'post_status' =&gt; 'publish',
              'post_author' =&gt; $user_ID,
  
          );
  if(isset($submitted)){
  wp_insert_post($new_post);
  }
  
  ?&gt;
  
  &lt;form method="post" action=" "&gt; 
  &lt;input type="text" name="post_title" size="45" id="input-title"/&gt;
  
  &lt;textarea rows="5" name="post_content" cols="66" id="text-desc"&gt;&lt;/textarea&gt; 
  
  
  &lt;input type="hidden" name="cat" value="7,100"/&gt; 
  
  &lt;input class="subput round" type="submit" name="submit" value="Post"/&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I tested it with out the form and it worked fine. but for somereason i cant seem to get it to work with the form. any ideas?</p>
  
  <p>also what is supposed to go in the action for the form?</p>
  
  <p>thanks for the help.</p>