<?php

include_once'db/connect_db.php';

if (isset($_POST['countryId']) && !empty($_POST['countryId'])) {

                                        $selectst2 = $pdo->prepare("SELECT stock.prodid, stock.qty ,item.itmname FROM stock  inner join   item on  stock.prodid=item.srl where stock.siteid='".$_POST['countryId']."'");
                                        $selectst2->execute();
                           //data................................................             
                        if($selectst2->rowCount() > 0 ){
                                        while($rowst2 = $selectst2->fetch(PDO::FETCH_ASSOC)){
                                            extract($itmname);
                                                                
                                                         echo '<option value="'.$rowst2['prodid'].'">'.$rowst2['itmname'].'</option>';
                                                          }
                                                     }else
                                                              {
                                                               echo '<option >Items Not Available</option>';
                                                              }
                                                     }
       
                                                        ?>
                         //data................................................                
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
