title: Using a link to connect two pages in database
body: <p>I have a page with a search bar that gets images of people in alphabetical order from a database. I also have a page with Next and Previous buttons that allows the user to browse through the database of images using Next and Previous buttons. I'm trying figure out a way to make an image a link so that the user can search through images, click the image, and it takes them to the same image on the Next and Previous page.</p>
  
  <p>This is my code that allows me to search and returns, lastname, firstname, and a picture:</p>
  
  <pre><code> &lt;div class="clearfix"&gt;&lt;/div&gt;
    &lt;?php
       if (isset($_GET['LastName'])) {
   $ln = $_GET['LastName'];
   }
          include 'connection.php';
          $query = "SELECT * FROM residents WHERE LastName like '$ln%' ";
          $result = mysql_query($query);
  
      while($person = mysql_fetch_array($result)) { ?&gt;
      &lt;div class="media col-sm-4"&gt;
          &lt;a class="pull-left" href="Browse.php"&gt;
      &lt;img class="media-object" src="upload/&lt;?php echo $person['Picture'];?&gt;" width="100"
      height="100"/&gt;
      &lt;/a&gt;
      &lt;div class="media-body"&gt;
       &lt;h4 class="media-heading"&gt;&lt;?php echo $person['LastName'] . ", " .   
  $person['FirstName']; ?&gt;&lt;/h4&gt;
  
     &lt;/div&gt;
  </code></pre>
  
  <p>The page I'm trying to connect to is "Browse.php" but as you browse through the images the URL changes by increasing..."Browse.php?page=1"..."Browse.php?page=2" and so on. Is there an easy way to connect an image with the corresponding Browse.php page? I've tried several things and any help would be much appreciated!</p>