jquery - how to update first three values by a condition with form button click in php mysqli -


when click next button want update display_type='hide' v_category = $cat_value, not values of category.

i want update first 3 values display_type='hide' of category , when again click next button again update next 3 values. tried @ never worked. code below.

<?php   if(isset($_post['right_value'])){      $cat_value =  $_post['right_value'];      $s_query = "select * t_post v_category='$cat_value'";      $r_s_query = mysqli_query($con,$s_query);      echo $check_value = mysqli_num_rows($r_s_query);       $query = "update t_post set display_type='hide'                 v_category='$cat_value' ";      $run_query = mysqli_query($con,$query); }  ?> 

running simple loop across $check_value should do:

$yourarr = [1,2,3,4,5]; foreach($check_value  $row){     $tmp[] = $row['id']; } if(count(array_intersect($yourarr, $tmp)) == count($yourarr)){      //update values 5,6,7 } 

Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -