

<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-info-circle"></i> New Material Info.</b>
        </center>
        <br/>      

        <div class="form-group row">                
            <label class="col-form-label col-2 col-lg-2 form-label text-lg-right">Material Name<span class="required" style="color:red">*</span></label>
            <div class="col-3 col-lg-3">
                <textarea class="form-control" placeholder="material name..." name="matname" id="matname" required></textarea>
            </div>

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

            <label class="col-form-label col-2 col-lg-2 form-label text-lg-right">Unit<span class="required" style="color:red">*</span></label>
            <div class="col-3 col-lg-3">                  
                <select class="select2 form-control w-100" name="iunit" id="iunit" data-placeholder="-select unit-" required>
                    <option></option>
                    <?php
                    $stmt = $db->query('SELECT *FROM tbl_units WHERE unit_status=1 ORDER BY unit_id ASC');
                    try
                    {
                        while ($rrr = $stmt->fetch(PDO::FETCH_ASSOC)) {
                        ?>
                            <option value="<?php echo $rrr['unit_id']; ?>"><?php echo $rrr['unit_name']; ?></option>
                        <?php
                        }
                        }
                        catch (PDOException $ex) {
                        //Something went wrong rollback!
                        echo $ex->getMessage();
                    }
                    ?>	
                </select>
            </div>
        </div>

        <div class="form-group row">    
            <label class="col-form-label col-2 col-lg-2 form-label text-lg-right">Item Type<span class="required" style="color:red">*</span></label>
            <div class="col-3 col-lg-3">                  
                <select class="select2 form-control w-100" name="itype" id="itype" data-placeholder="-select type-" required>
                    <option></option>
                    <?php
                    $stmt = $db->query('SELECT *FROM tbl_typesitem WHERE sttype=1 ORDER BY item_type_id ASC');
                    try
                    {
                        while ($rrr = $stmt->fetch(PDO::FETCH_ASSOC)) {
                        ?>
                            <option value="<?php echo $rrr['item_type_id']; ?>"><?php echo $rrr['itypeName']; ?></option>
                        <?php
                        }
                        }
                        catch (PDOException $ex) {
                        //Something went wrong rollback!
                        echo $ex->getMessage();
                    }
                    ?>	
                </select>
            </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="btnMat" style="border-radius: 4px;" type="submit" id="">Submit</button>
        </center>
        <br>
    </div> <!--border -->
    </div>
  </div>
</form>