javascript - Page wise display is not working as expected -


i trying display records multiples of 5, getting first 5 records again , again.

homepage-slideshow.php

<select multiple class="form-control " id="sel2"  size="10" >                             <?php                              session_start();                             if (isset($_session["min"]) || isset($_session["count"])) {                                     $time = (int)$_session["min"];                                     $something = $_session["something"];                                     $everything = $_session["everything"];                                     }                         $count = (int)$_session["count"];                         $select_query=          "select * video_details c_something = '$something' or c_everything = '$everything' having video_min <= $time  limit $count,5";                         $select_query_run =     mysqli_query($conn,$select_query);                          while ($select_query_array=   mysqli_fetch_array($select_query_run) )                         {                             echo "<option value='".htmlspecialchars($select_query_array["video_question"])."' >".htmlspecialchars($select_query_array["video_question"])."</option>";                         }                         ?>                             </select>                             <?php                              $new = $count + 5;                             $_session["count"] = $new;                             $_session["min"] = $time;                             $_session["something"] = $something;                             $_session["everything"] = $everything;                             //session_destroy();                             ?>                     </div>                   </div>                 <div class="center">                     <input type="button" class="btn btn-success font-30" value="i curious this" />                      <form id="next_page" name="next_page" method="post" action="next.php" data-ajax="false">                         <input type="submit" class="btn btn-success font-30" id="next" name="next" value="learn else" />                     </form>                  </div> 

i trying increase $count value when learn else button pressed. redirects next.php try reassign increased value count.

next.php

<?php   session_start();      $inc = (int)$_session["count"];     $time = (int)$_session["min"];     $something = $_session["something"];     $everything = $_session["everything"];  echo $inc;      $_session["count"] = $inc;     $_session["min"] = $time;     $_session["something"] = $something;     $_session["everything"] = $everything;      header("location: homepage-slideshow.php#services-section"); 

?>

the echo statement gives 5 output, query displays old output still. if hardcode 5 in query, gives next 5 records not able dynamically change value of $count in here.

please me


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -