title: Two Input Field
body: <p><strong>I am trying to create a bus enquiry  project where two input box "from &amp; to" is done but when i search bus it takes strkey value then show it</strong></p>
  
  <pre><code>&lt;form action="#" method="get" align="center" &gt;
              &lt;input type="text" name="txtStart" placeholder="FROM"&gt;
              &lt;input type="text" name="txtEnd" placeholder="TO"&gt;
              &lt;input type="submit" value="Search" name="btn_search"&gt;
          &lt;/form&gt;
  
          &lt;table border="1" align="center" width="70%"&gt;
              &lt;tr&gt;
                  &lt;th&gt;Bus Name&lt;/th&gt;
                  &lt;th&gt;Stopage Name&lt;/th&gt;
                  &lt;th&gt;Time&lt;/th&gt;
              &lt;/tr&gt;
  
      &lt;?php
          if(isset($_GET['btn_search']))
          {
  
              $strkey=$_GET['txtStart'];
              $endkey=$_GET['txtEnd'];
              $sql="SELECT * FROM  bus_details WHERE Stopage_Name ='$strkey' AND Bus_No IN (SELECT Bus_No FROM bus_details WHERE  Stopage_Name='$endkey' )  ";
              $query=mysqli_query($ccon,$sql);
                              $num = mysqli_num_rows($query);
                              while($rows = mysqli_fetch_assoc($query))
  
              {
      ?&gt;      
  </code></pre>
  
  <p>database structure like
  id  Bus_No  Bus_Name  SEQ  Stopage_Code Stopage_Name   Depart_Time 
   1   0022    Night     1     JGM          JHARGRAM      6:00
   2   0022    Night     2     LDS           LODHASULI      6:30
   3   0022    Night     3     MID           MIDNAPUR       7:00
   4   0022    Night     4     BPL           BELPAHARI       7:25 </p>
  
  <p>5   5588     Day      1     JGM           JHARGRAM    12:00
   6   5588     Day      2     LDS           LODHASULI      12:30
   7   5588     Day      3     MID           MIDNAPUR       01:00
   8   5588     Day      4     BPL           BELPAHARI       01:30</p>
  
  <p>9   0022    Night     1     BPL           BELPAHARI       09:00
  10   0022    Night     2     MID           MIDNAPUR      09:30
  11   0022    Night     3     LDS           LODHASULI     10:00
  12   0022    Night     4     JGM           JHARGRAM    10:30 </p>
  
  <p>Problem
  when I search "JHARGRAM TO MIDNAPUR" it shows JHARGRAM depart time but when search "BELPAHARI TO JHARGRM" it shows BELPAHARI depart time.</p>
  
  <p>Want SEQ wise show result (see id 1-4 and 9-12), when i search "BELPAHARI TO JHARGRAM" only show BELPAHARI depart time as SEQ(1) on id no 9.</p>
  
  <p>If any problem with database or how to set databae please help me out</p>