my sample pagination code in PHP written long time ago. Cleanup code coming soon