<h1>Ticket search</h1>
</div>

<?php 
if (!is_admin()) {
    echo "<div class='alert alert-danger'>You must be an administrator to view this page!</div>";
    die;
}
if (isset($_GET['searchby'])) {
    $ticket = new ticket();
    switch ($_GET['searchby']) {
        default:
            return;
            break;
        case 'barcode':
            $tickets = $ticket->searchTickets('barcode', $_POST['barcode']);
            break;
        case 'name':
            $tickets = $ticket->searchTickets('name', $_POST['name']);
            break;
        case 'email':
            $tickets = $ticket->searchTickets('email', $_POST['email']);
            break;
    }
    ?>

  <div class="table-responsive">
    <table class="table table-condensed table-bordered table-striped">
      <thead>
        <tr>
          <th>Barcode</th>