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 />"; } } Quote Link to comment https://forums.phpfreaks.com/topic/173814-adding-pagination-to-dealer-locator/ 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.