title: POST not grabbing all form variables
body: <p>Trying to figure out why my code does not send over all POST data. The code is used on main page to get request information stored in db and used on separate page to post status updates made by me to DB. Its basically the same, except variable names.</p>
  
  <p>Note: I have searched here a lot. Ive used var_dump that shows only 'content' data in the array. Im not fully comfortable with js but can follow some of it. Hence the code below is a template that Ive edited and tested on one page before trying to expand to another. Thats where the issue is. I am not sure why it works for one and not the other. Apologies if this is considered duplicate of anything, but I didnt find a good answer in similar post that would explain why.
  admin.php:</p>
  
  <pre><code>&lt;form action="insert.php" method="post" enctype="multipart/form-data"&gt;
     &lt;div class="share"&gt;
        &lt;div class="arrow"&gt;&lt;/div&gt;
        &lt;div class="panel panel-default"&gt;
  
           &lt;div class="panel-body"&gt;
              &lt;div class=""&gt;
                 &lt;img src="../logo.png" style="height:60px; width:60px; float:left; margin-right:3px;" /&gt;
                 &lt;textarea name="content1" id="content1" cols="40" rows="10"  class="form-control message" style="height: 60px; width:450px; overflow: hidden;"&gt;&lt;/textarea&gt; 
              &lt;/div&gt;
           &lt;/div&gt;
  
           &lt;div class="panel-footer"&gt;
              &lt;div class="row"&gt;
                 &lt;div class="col-md-7"&gt;
                    &lt;div class="form-group"&gt;
                       &lt;div class="btn-group"&gt;
                          &lt;select name="avatar" id="avatar" class="form-control-issue-avatar"&gt; &lt;----whats not sending
                             &lt;option value="0" selected="selected"&gt;Author&lt;/option&gt;
                             &lt;option value="per1"&gt;P&lt;/option&gt;
                             &lt;option value="per2"&gt;W&lt;/option&gt;
                          &lt;/select&gt; 
                       &lt;/div&gt;
                    &lt;/div&gt;
                 &lt;/div&gt;
                 &lt;div class="col-md-5"&gt;
                    &lt;input type="submit" value="Post" class="post_button"&gt;                               
                 &lt;/div&gt;
              &lt;/div&gt;
           &lt;/div&gt;
        &lt;/div&gt;
  
  &lt;/form&gt;
  </code></pre>
  
  <p>Here is the insert.php:</p>
  
  <pre><code>if(isSet($_POST['content1'], $_POST['avatar']))
  
  {
   $content1=$_POST['content1'];
   $avatar=$_POST['avatar']; // &lt;--- comes back NULL
  $sql_in= mysqli_query($con,"SELECT comment,comment_id,status_time FROM comments order by comment_id desc");
  $r=mysqli_fetch_array($sql_in);
  }
  </code></pre>
  
  <p>and lastly the post.js that calls it:</p>
  
  <pre><code> $(function() {
  
  $(".post_button").click(function() {
  
   var element = $(this);
  
   var test = $("#content1").val();
  
   var dataString = 'content1='+ test;
  
   if(test=='')
   {
   alert("Please Enter Some Text");
  
  }
  else
  {
  $("#flash").show();
  $("#flash").fadeIn(400).html('&lt;span class="loading"&gt;Loading Comment...&lt;/span&gt;');
  
  
      $.ajax({
      type: "POST",
  url: "insert.php",
   data: dataString,
  cache: false,
  success: function(html){
  
  
  
  $("#display").after(html);
  
  document.getElementById('content1').value='';
  $("#flash").hide();
  
  }
  
  
  });
  }
  
  
  return false;
  });
  
  });
  </code></pre>
  
  <p>the var_dump etc:</p>
  
  <pre><code>Array ( [content1] =&gt; sass )
  C:\wamp64\www\post\insert.php:32:
   array (size=1)
  'content1' =&gt; string 'sass' (length=4)
  </code></pre>