Pagination system error
Here is the code.
<?php $perPage = 5; if (!isset($_GET['submit'])) { header("location: index.php?page=1"); } else { $page = $_GET['submit']; } $start = (($page - 1) * $perPage); $con = mysqli_connect("mysql5.000webhost.com", "a8995753_db2", "xxxxxxxxx", "a8995753_db2") or die("Error ee oay: " . mysqli_connect_error()); $query = "SELECT * FROM customer"; $numOfRows = mysqli_num_rows(mysqli_query($con, $query)); $numOfPages = ceil($numOfRows / $perPage); $query .= " LIMIT $start, $perPage"; $exQuery = mysqli_query($con, $query); while ($row = mysqli_fetch_array($exQuery)) { echo $row['custID'] . " " . $row['name'] . "<br>"; } ?>
Please help me to solve this problem.
-
Brian Tayler -
Thanks
Signature.-=-.From Start to Finish. Learn How to Make Money in 30 Days!.-=-.X81MBTp{{ DiscussionBoard.errors[8190069].message }} -
-
Valdor Kiebach -
Thanks
{{ DiscussionBoard.errors[8190137].message }} -
-
crescendo -
Thanks
{{ DiscussionBoard.errors[8199668].message }} -