Scorpion28 Posted May 22, 2012 Share Posted May 22, 2012 I'm so lost when it comes to coding this, can someone show me a simple way to code the pagination. <? include ("Inc/config.php"); $sql = "SELECT * FROM leads_database WHERE active = '0' ORDER BY id ASC LIMIT 30"; $exc_query = mysql_query($sql); if(mysql_num_rows($exc_query) > 0) { while($rec = mysql_fetch_array($exc_query)) { $id = $rec['id']; $fname = $rec['fname']; $mname = $rec['mname']; $lname = $rec['lname']; $pro_title = $rec['pro_title']; $office = $rec['office']; $office = $rec['office']; $address = $rec['address']; $city = $rec['city']; $state = $rec['state']; $zip = $rec['zip']; $phone = $rec['phone']; $email = $rec['email']; ?> <div> <div id="lead_company"><? echo "$office"; ?></div> <div id="lead_poc"><? echo "$fname"; ?></div> <div id="lead_city"><? echo "$city"; ?></div> <div id="lead_state"><? echo "$state"; ?></div> <div id="lead_call"> <form name="save_lead"action="Process/savelead.php" method="post" enctype="multipart/form-data" id="save_lead"> <input type="hidden" id="hidval" name="hidval" value="6gv51v+6e5b41e6b5e16e841gwe6854e1gv6d5g16"/> <input type="hidden" name="lead_id" value="<? echo "$id";?>" /> <input type="hidden" name="emp_id" value="<? echo $_SESSION['L9ID'];?>" /> <label> <input type="submit" name="submit" id="submit" value="Save" /> </label> </form> </div> </div> <? }} ?> Quote Link to comment https://forums.phpfreaks.com/topic/262951-pagination/ Share on other sites More sharing options...
mrMarcus Posted May 22, 2012 Share Posted May 22, 2012 Great pagination tutorial: http://www.phpfreaks.com/tutorial/basic-pagination Quote Link to comment https://forums.phpfreaks.com/topic/262951-pagination/#findComment-1347770 Share on other sites More sharing options...
Hall of Famer Posted May 23, 2012 Share Posted May 23, 2012 Id recommend you to use a Pagination class library, it can be downloaded from phpclasses.org. Quote Link to comment https://forums.phpfreaks.com/topic/262951-pagination/#findComment-1347840 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.