php - Limit list using a button -



php - Limit list using a button -

i want print lastly access application of each user, want limit list specific number (that configured user). atm can print everything, want implement button allow show 5 events , them go forth. 1 time implemented backing well.

however code right follows:

$min = 0; if(count($time) > 5) { $aux = 5; } else { $aux = count($time); } if(isset($_post['button'])) { if((count($time) - $aux) > 5) { $aux = aux + 5; $min = $min + 5; } else { $aux = count($time); if(count($time) > 5) { $min = count($time) - 5; } } } for($i = $min ; $i<$aux; $i++) { echo '<br>'.($i+1).'. '.date('y-m-d h:i:s', $time[$i]['time_stamp'])."\t".' por '.$ips['ip'].'<br>'; } ?> <input name="button" type="button" id="button" onclick="access.func.php" value=">>" />

i can't seem update table, because think button not beingness called proper way.

edit: axu typo changed.

edit2: $count has been changed count($time)

first off, there's typo in code.

$axu = aux + 5;

change $aux = $aux + 5; , let's see.

edit:

put input button in <form> this:

<form action="access.func.php" method="post"> <input name="button" type="submit" id="button" value=">>" /> </form>

php

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -