title: passing input value using jquery on mysql query
body: <p>I have following html form:</p>
  
  <pre><code> &lt;form method="post" action=""&gt;
      &lt;input type="hidden" name="userid" id="user" value="&lt;?php echo $user ?&gt;"/&gt;
      &lt;textarea name="comment" class="subcomment_form" id="ctextarea&lt;?php echo $suggestid ?&gt;"&gt;&lt;/textarea&gt;
      &lt;input type="submit" value="Post" id="&lt;?php echo $suggestid ?&gt;" class="form_btn" style="margin-top: 5px"/&gt;
   &lt;/form&gt;
  </code></pre>
  
  <p>following JS code:</p>
  
  <pre><code>$('.form_btn').live("click",function() 
  {
  
  var ID = $(this).attr("id");
  
  var user= $("input[name=userid]").val();
  var comment= $("#ctextarea"+ID).val();
  var dataString = 'comment='+ comment + '&amp;suggestid=' + ID + 'user' + user;
  
  if(comment=='')
  {
  alert("Please Enter Comment Text");
  }
  else
  {
  $.ajax({
  type: "POST",
  url: "action/subcomment.php",
  data: dataString,
  cache: false,
  success: function(html){
  $("#commentload"+ID).append("html");
  $("#ctextarea"+ID).val('');
  $("#ctextarea"+ID).focus();
   }
   });
  }
  return false;
  });
  </code></pre>
  
  <p>and following php code for subcomment.php file:</p>
  
  <pre><code>if($_POST['comment'])
  {
  $comment=$_POST['comment'];
  $suggestid=$_POST['suggestid'];
  $user=$_POST['user'];
  $sql = "INSERT INTO user_suggestions_comments (uvd_id, user_id, usc_comment) VALUES ('".$_POST['suggestid']."', '".$_POST['user']."','".$_POST['comment']."')";
  mysql_query( $sql);
  }
  </code></pre>
  
  <p>the problem I have is that value from <code>&lt;input type="hidden" name="userid" id="user" value="&lt;?php echo $user ?&gt;"/&gt;</code> is not passed on php file and textarea content is passed. What I need to change inside that JS code to make it work?</p>