title: Wordpress plugin insert query is not working
body: <p>I'm calling a wordpress plugin function via a front end page which is working good, the function that i m calling is inserting data into the database but its not working<br />
  here is the query i m running(which is not working):</p>
  <p>The function is  being called on submit as echo value is printed but no data is being inserted</p>
  <pre><code>function savedata(){
  echo &quot;&lt;pre&gt;&quot;;print_r($_POST);exit;
  global $wpdb;
  $wpdb-&gt;insert('questoptions',
       array(
          'question_id' =&gt; $_POST['question_id'],
          'text' =&gt; $_POST['text']
  
  ),
      array(
          '%s',
          '%s'
      )
  );
  
  die();
  return true;
  }
  </code></pre>
  <p>here is the function calling this function from front end:</p>
  <pre><code>function abc(){
  jQuery.ajax({
          type: 'POST',
          url: &quot;&lt;?php echo admin_url('admin-ajax.php'); ?&gt;&quot;,
          data: { action: 'savedata', 'question_id': document.getElementById('question_id').value, 'text': document.getElementById('text').value },               
          success: function(data){
              alert('success');
              console.log(data);
          },
          error: function(errorThrown){
              console.log(errorThrown);
          }
      });
  }
  </code></pre>
  <p>anyone has any idea?<br />
  Thanks.</p>