<?        if(!$link)
               {
                   die('not connected');
               }
                    $mlink=  mysqli_query($link, "select * from products");
                    $row=  mysqli_fetch_array($mlink);  ?>
 <input list="pcode" required="required" class="form-control col-md-7 col-xs-12">     
                  <datalist id="pcode">
                       <?php
                         while($row= mysqli_fetch_array($mlink))
                           {
                              ?>
                <option value="<?php echo $row ['productcode']; ?>">  <?php } ?>
                            </datalist>
the above query doesnt fetch all the data, it misses the very first data and fetch the rest, i dont know y?? i was retriving all the fetched data into a datalist, it shows all the data except the first one,THE FULL CODE was pasted here, https://pastebin.com/LLDN0Y9M
 
    