

<form id="" action="" method="POST" enctype="multipart/form-data" autocomplete="off">
  <br><br> 
    <div class="row">
    <div class="col-md-1"></div>
    <div class="col-md-10" style="background-image: url(../img/placeholders/inner-texture-bg.png); border-radius: 8px;">
      <div style='border-radius: 8px;border: 2px solid #7E9350;width:100%;margin-top:1%;margin-bottom:1%;'>
        <br/>
        <center>
           <b style="font-family: century gothic;font-size: 23px;"><i class="fa fa-user"></i> New Supplier/Subcontractor.</b>
        </center>
        <br/>      

        <div class="form-group row">                
            <label class="col-form-label col-2 col-lg-2 form-label text-lg-right">S/S Type<span class="required" style="color:red">*</span></label>
            <div class="col-3 col-lg-3">
                <select class="show-tick ms select2" name="tpid" id="tpid" style="width: 100%" data-placeholder="~select type~"  onchange="getsctg(this.value)" required>
                    <option></option>
			        <?php
                    $stmt = $db->query('SELECT *FROM tbl_s_s');
                    try
                    {
                        while ($rrr = $stmt->fetch(PDO::FETCH_ASSOC)) {
                        ?>
                            <option value="<?php echo $rrr['ss_id']; ?>"><?php echo $rrr['namesu']; ?></option>
                        <?php
                        }
                        }
                        catch (PDOException $ex) {
                        //Something went wrong rollback!
                        echo $ex->getMessage();
                    }
                    ?>	
			    </select>
            </div>

            <label class="col-form-label col-2 col-lg-2 form-label text-lg-right">Company Name<span class="required" style="color:red">*</span></label>
            <div class="col-3 col-lg-3">
                 <textarea type="text" name="cpny" rows="2" class="form-control" placeholder="name here..." required></textarea>
            </div>
        </div>
            
        <div class="form-group row">              
            <label class="col-form-label col-2 col-lg-2 form-label text-lg-right">Rank<span class="required" style="color:red">*</span></label>
            <div class="col-3 col-lg-3">                  
                <select class="show-tick ms select2" name="rank_name" style="width: 100%" data-placeholder="~select rank~" required>
                    <option></option>
			        <?php
			            $selectrank= $conn->prepare("SELECT * FROM tbl_rank ");
                        $selectrank->execute();
                        while($row_1rank = $selectrank->fetch()) { ?>
                        
                            <option value = <?php echo $row_1rank['rank_id']; ?>><?php echo $row_1rank['rank_name']; ?></option>
                        <?php
                        }
			        ?>
                </select>
            </div>

            <label class="col-form-label col-2 col-lg-2 form-label text-lg-right">Owner/MD<span class="required" style="color:red">*</span></label>
            <div class="col-3 col-lg-3">                  
               <textarea type="text" name="owner" rows="2" class="form-control" placeholder="write owner..." required></textarea>
            </div>
        </div>

        <div class="form-group row">    
            <label class="col-form-label col-2 col-lg-2 form-label text-lg-right">S/S Category<span class="required" style="color:red">*</span></label>
            <div class="col-3 col-lg-3">                  
                <select class="show-tick ms select2" name="ssctg" id="ssctg" style="width: 100%" data-placeholder="~choose one~" required>
                    <option></option>			        
                </select>
            </div>

            <label class="col-form-label col-2 col-lg-2 form-label text-lg-right">Contact<span class="required" style="color:red">*</span></label>
            <div class="col-3 col-lg-3">                  
                <input type="number" class="form-control" id="supp_phone" name="supp_phone" 
                oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');"placeholder="07..." required>
            </div>
        </div>

        <div class="form-group row">    
            <label class="col-form-label col-2 col-lg-2 form-label text-lg-right">TIN N<sup>o</sup></label>
            <div class="col-3 col-lg-3">                  
                <input type="number" class="form-control" id="" name="tino" placeholder="Tin...">
            </div>
        </div>

        <hr>
        <center>
            <button type="reset" class="btn btn-default btn-sm" style="border-radius: 4px;">Reset</button>
            <button class="btn btn-primary btn-sm" name="add_supsub" style="border-radius: 4px;" type="submit" id="">Submit</button>
        </center>
        <br>
    </div> <!--border -->
    </div>
  </div>
</form>


