<?
// see online: http://kentung.f2o.org/scripts/paging/sample2.php
include("./form.html"); // include form.html
require("paging_class.php");
$paging=new paging(5,5);
$paging->db("localhost","username","password","dbname");
$paging->query("select * from paging where MY_FIELD like '%$_GET[keyword]%' order by MY_FIELD asc");
echo "<center>".$paging->print_link()."</center><hr>";
$page=$paging->print_info();
echo "Data $page[start] - $page[end] of $page[total]<br>\nSearch: $_GET[keyword]<hr>\n";
while ($result=$paging->result()) {
echo $paging->print_no()." : ";
echo "$result->MY_FIELD<br>\n";
}
?>
|