title: Next record doesnt exist error handling
body: <p>I have this bit of code that goes to the next record in the database based on the record id, when it gets to the last record the next time you click it the code breaks due to the record not existing in the table and the url not being valid.  Is there some error handling i could put into this to show an alert when the last record has been reached?  Thanks</p>
  
  <pre><code>&lt;a id="next" data-ajax="true"  href="eventviewtester.php?eventid= &lt;?php echo $_GET['eventid'] +1;?&gt;" style="display:none;"&gt;&lt;/a&gt;
  </code></pre>