0
<form class="navbar-form" role="search" method="get" action="search.php">
    <div class="input-group">
        <input type="text" class="form-control" placeholder="Search" name="search" id="search">
        <div class="input-group-btn">
            <button class="btn btn-default" type="submit"><i class="glyphicon glyphicon-search"></i></button>
        </div>
    </div>
</form>  

The above will pass the value by GET.

<?php
session_start();
require_once 'dbconnect.php';

$query = $DBcon->query("SELECT * FROM flight WHERE airport LIKE '%".$_GET['search']."%'");
$count = $query->num_rows; // if email password are correct returns must be 1 row

?>

And this should display the result and it said unknown index:search instead...

Any idea?

V.Vachev
  • 341
  • 1
  • 7
  • 20
TszKin Anthony
  • 15
  • 2
  • 10

0 Answers0