jakebur01 Posted September 10, 2009 Share Posted September 10, 2009 I need to add pagination to this script that retrieves all the zip codes with a given range. I have done basic pagination on testimonial pages and photo pages. But, never anything like this. $zips = $z->get_zips_in_range($formzip, $formrange, _ZIPS_SORT_BY_DISTANCE_ASC, true); if ($zips === false) echo 'Error: '.$z->last_error; else { echo "<h4>You have selected $formzip and $formrange miles.</h4><br /><br />"; foreach ($zips as $key => $value) { $result = mysql_query("SELECT * FROM extreme WHERE Zip = '$key'", $db); while($myrow = mysql_fetch_array ($result)) { $Dealer=$myrow['Dealer']; $Address=$myrow['Address']; $City=$myrow['City']; $State=$myrow['State']; $Zip=$myrow['Zip']; $Phone=$myrow['Phone']; echo "<b>$Dealer</b><br />$Address<br />$City, $State $Zip<br />$Phone<br />You are $value miles away from this $dname dealer.<br /><br />"; } } Link to comment https://forums.phpfreaks.com/topic/173814-adding-pagination-to-dealer-locator/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.