PHP - dynamic display of CSV data with pagination -


i new php , scripting languages. designing web page need display contents of csv file in paginated format. also, going have range selection enable users select range value. after selecting range value, need display values csv satisfy given criteria. code have far.

<?php        $totalcolumns = $_session["totalcolumns"]; ?>  <!-- activate simple slider on input -->   <h2>keyword scores</h2>   <?php  $i = 1; while (++$i <= $_session['totalcolumns']) {     $range = $_session["min-column-$i"] . ',' . $_session["max-column-$i"];?>         <br><input type="text" data-slider="true" data-slider-range="<?php echo $range ?>" data-slider-step="1">         <?php } ?>   <!--<input type="text" data-slider="true" data-slider-range="1,500" data-slider-step="1">   <script>     $("[data-slider]")         .each(function () {             var range;             var input = $(this);             $("<span>").addclass("output")                 .insertafter(input);             range = input.data("slider-range").split(",");             $("<span>").addclass("range")                 .html(range[0])                 .insertbefore(input);             $("<span>").addclass("range")                 .html(range[1])                 .insertafter(input);         })         .bind("slider:ready slider:changed", function (event, data) {             $(this).nextall(".output:first")                 .html(data.value.tofixed(2));         }); </script> 

as per above code, able display csv values successfully. per above code, have slider using user can select range value wants display. example, let's assume have below contents in csv file.

  • authorid k1 k2 k3
  • author1 4 5 7
  • author2 6 5 8
  • author3 9 1 2

so, per above data, have 3 sliders (for k1,k2 , k3). sliders have range per min , max of values in columns k1, k2 , k3. k1, slider have min value of 4 , max value of 9. can select value between 4 , 9 , values satisfying given criteria need displayed in screen. example, k1, if select value 5, csv file should displayed below.

  • authorid k1 k2 k3
  • author2 6 5 8
  • author3 9 1 2


Comments

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

java.util.scanner - How to read and add only numbers to array from a text file -

iphone - Three second countdown in cocos2d -