title: I want to change the value of 'is_active' change 1 or 0 in my database using jquery, Here is my code
body: <p>Here is button image value</p>
  
  <pre><code>$result = mysqli_query($con,"SELECT * FROM customer WHERE is_active=0");
  
  echo "&lt;div class='row'&gt;
  
                &lt;div class='col-lg-12'&gt;
  
                  &lt;table class='table table-striped table-advance table-hover'&gt;
                    &lt;tbody&gt;
                      &lt;tr&gt;
                        &lt;th&gt;&lt;i class='icon_profile'&gt;&lt;/i&gt; First Name&lt;/th&gt;
                        &lt;th&gt;&lt;i class='icon_calendar'&gt;&lt;/i&gt; DOB&lt;/th&gt;
                        &lt;th&gt;&lt;i class='icon_mail_alt'&gt;&lt;/i&gt; Email&lt;/th&gt;
                        &lt;th&gt;&lt;i class='icon_pin_alt'&gt;&lt;/i&gt; Country&lt;/th&gt;
                        &lt;th&gt;&lt;i class='icon_mobile'&gt;&lt;/i&gt; Mobile&lt;/th&gt;
                        &lt;th&gt;&lt;i class='icon_cogs'&gt;&lt;/i&gt; Action&lt;/th&gt;
                      &lt;/tr&gt;";
                      while($row = mysqli_fetch_array($result))
                      {
                        echo "&lt;tr&gt;";
                        echo "&lt;td&gt;" . $row['first_name'] . "&lt;/td&gt;";
                        echo "&lt;td&gt;" . $row['dob'] . "&lt;/td&gt;";
                        echo "&lt;td&gt;" . $row['email'] . "&lt;/td&gt;";
                        echo "&lt;td&gt;" . $row['country_livingin'] . "&lt;/td&gt;";
                        echo "&lt;td&gt;" . $row['mobile'] . "&lt;/td&gt;";
                        echo"&lt;td&gt;
                          &lt;div class='btn-group'&gt;
                            &lt;a id='pending' class='imgicon btn btn-success' href='#'&gt;&lt;i id='check' class='icon_check_alt2'&gt;&lt;/i&gt;&lt;/a&gt; 
                          &lt;/div&gt;
                        &lt;/td&gt;";
                        echo "&lt;/tr&gt;";
                      }
                      echo "&lt;/table&gt;";
                      mysqli_close($con);
                  ?&gt;
  </code></pre>
  
  <p>Jquery</p>
  
  <pre><code>$(".imgicon").on("click",function()
  {
  
   // alert("button");
  
  var parent = $(this).parents("tr");
  
  var dataEmail = $(parent).find("td:nth-child(3)").text();
  
          $.ajax({
           url:'pending_method.php',
           dataType:'json',
           data:{email:dataEmail},
           success:function(data){
              alert('hi')
            },
            error:function(data){
              alert("error");
            }
  
          });
  
      });
  </code></pre>
  
  <p>pending_method.php</p>
  
  <pre><code>&lt;?php
          // $con=mysqli_connect("166.62.6.65","UBBS_Matrimonial","UBBS_Matrimonial","UBBS_Matrimonial");
  
          $con=mysqli_connect("localhost","root","","Dummy");
          // Check connection
          if (mysqli_connect_errno())
          {
              echo "Failed to connect to MySQL: " . mysqli_connect_error();
          }
          var email = $_POST["email"];
          $result = mysqli_query($con,"UPDATE customer set is_active=1 WHERE email=email);
  ?&gt;
  </code></pre>