</body>
     </html>
 <?php 
 if ($_GET['email_address']) {
     $contactSearch = $ConstantContact->searchContactsByEmail($_GET['email_address']);
     if (!$contactSearch) {
         exit('Email not found');
     }
     // Find the appropriate event type for the verified contact
     $page = isset($_GET['nextLink']) ? $_GET['nextLink'] : null;
     switch ($_GET['event_type']) {
         case 'sends':
             $event = $ConstantContact->getContactSends($contactSearch[0], $page);
             break;
         case 'clicks':
             $event = $ConstantContact->getContactClicks($contactSearch[0], $page);
             break;
         case 'opens':
             $event = $ConstantContact->getContactOpens($contactSearch[0], $page);
             break;
         case 'forwards':
             $event = $ConstantContact->getContactForwards($contactSearch[0], $page);
             break;
         case 'optouts':
             $event = $ConstantContact->getContactOptOuts($contactSearch[0], $page);
             break;
         case 'bounces':
             $event = $ConstantContact->getContactBounces($contactSearch[0], $page);
             break;
     }
     // Display the results of the search