title: Ajax call not getting a success response
body: <p>We have 2 text fields. We have tried to post user_Name and Password  through an ajax call.</p>
  
  <p>We have used PHP services and the username and password do save to the DB successfully.</p>
  
  <p>But we do not get any response from our success or fail.</p>
  
  <p>The code:</p>
  
  <p>PHP:</p>
  
  <pre><code> if(isset($_GET['ecovauserName']) &amp;&amp; isset($_GET['ecovauserage']) ){
      $ecovauserName             = $_GET['ecovauserName'];
      $ecovauserage              = $_GET['ecovauserage'];
  
  
  
       $sql  = "SELECT ecovauserName,ecovauserage FROM ecovauserinfo WHERE ecovauserName = '" . $ecovauserName . "' and ecovauserage = '" . $ecovauserage . "'";
      $query      = mysql_query($sql);
  
      if (mysql_num_rows($query) &gt; 0)
      {
          echo "fail to post";
      }
      else
          {  echo("Entered into DB inserting the values");
  
          $insert = "INSERT INTO ecovauserinfo (ecovauserName,ecovauserage)
                          VALUES ('" . $ecovauserName . "','" . $ecovauserage . "')";
  
          $query  = mysql_query($insert);
          echo $insert;
          if ($query)
          {
              echo "EventFile Successfully stored";
          }
              else
              {
  
  
                  echo "Insert failed";
              }
          }
       }
  </code></pre>
  
  <p>Ajax Call:-</p>
  
  <pre><code> $.ajax({
                 url:'http://192.168.3.134:8080/ekova/postevent.php',
                 type:'POST',
                 data:{ecovauserName :username,ecovauserage:password},
                 contentType: "application/json; charset=utf-8",
                  dataType: "jsonp",
                 success:function(responsive){
                  alert(responsive);
                 },
                 error:function(w,t,f){
                   console.log(w+' '+t+' '+f);
                 }
              });
  </code></pre>
  
  <p>The above code is working fine. The username and password are successfully stored in the DB. But we need to get a success of fail response.</p>
  
  <p>My success:function is not called and so my alert box never runs to notify me of the success.</p>
  
  <p>Please guide me with what is wrong in the code.</p>