Jump to content

Recommended Posts

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.