Your IP : 18.188.218.219


Current Path : /home/lentoinv/covisclubinternational.com/profile/
Upload File :
Current File : //home/lentoinv/covisclubinternational.com/profile/searchform1.php

 <div class="col-xs-12">
<h2 style="font-size: 20px; padding: 10px">Search  Members</h2>
          
         
              
             <div style="float:right"> 
             <form method="POST">
             <table><tr><td><input name="search" class="form-control" placeholder="Enter Keyword" required></td><td><select name="key" class="form-control select2" required>
             <option value="">Search by...</option>
             <option value="firstname">Surname</option>
             <option value="lastname">Other Names</option>
             
             <option value="email">E-mail</option>
             <option value="user">Username</option>
             <option value="phone">Phone Number</option>
             </select></td><td><button type="submit" class="btn btn-warning"><i class="fa fa-search"></i> Search Client </button></td></tr></table>
             </form>
            </div>

            <!-- /.box-header -->
            <div class="box-body  table-responsive">
              <br><br>
            <form method="post" action="">
              <?php if(isset($_POST['search'])){  ?>
           
              <table class="table">
                <thead>
                <tr>
                  <th>Surname</th>
                  <th>Other Names</th>
                  <th>E-mail</th>
                  <th>Username</th>
                  <th>Phone No</th>
                  <th>Address</th>
                  <th>Action</th>
                </tr>
                </thead>
                <tbody>
                <?php  $search = isset($_POST['search']) ? $_POST['search'] : 'search';
        $key = isset($_POST['key']) ? $_POST['key'] : 'email'; $i=1;
         $sql=$db->query("SELECT * FROM user WHERE $key LIKE '%$search%' ORDER BY sn DESC LIMIT 200 " )or die(mysqli_error());
          while($row=mysqli_fetch_assoc($sql)){ $e=$i++;
            echo '<tr>
                  <td>'.$row['firstname'].'</td>
                  <td>'.$row['lastname'].'</td>
                  <td>'.$row['email'].'</td>
                  <td>'.$row['user'].'</td>
                  <td>'.$row['phone'].'</td>
                  <td>'.$row['address'].'</td>
          <td><a class="btn btn-primary btn-sm" href="searchProfile.php?u-ref='.sha1($row['sn']).'" >View Profile</a></td>
                </tr>'; } ?>
              
                </tbody>

              </table>
            <?php } echo $e ?> Found
              </form>
            </div>
            <!-- /.box-body -->
          </div>
          <!-- /.box -->
        </div>
        <!-- /.col -->







        

?>