
                      <div class="form-group">
                          <label for="CUST_STATE">State:</label>
                              <select name="CUST_STATE" id="CUST_STATE" class="form-control">
                              <option value="0">-- Select States --</option>
                                <?php                 
                                  //while($row4 = mysqli_fetch_array($result4)) 
                                  foreach($result4 as $row4)
                                  { 
                                ?>
                               <option value="<?php echo $row4['STATES_CODE']; ?>" <?php if ($_SESSION['CUST_STATE'] == $row4['STATES_CODE']) { echo 'selected="selected"'; } ?>>
                                <?php echo $row4['STATES_NAME']; ?>
                              </option>
                                <?php } ?>
                              </select>
                              <p class="text-danger"><small>* required.</small></p>
                        </div>

                        <div class="form-group">
                          <label for="CUST_CITY">City:</label>
                          <input type="text" class="form-control" name="CUST_CITY" id="CUST_CITY" value="<?php echo $_SESSION['CUST_CITY']; ?>" required>
                          <p class="text-danger"><small>* required.</small></p>
                        </div>

                        <div class="form-group">
                          <label for="CUST_POSTCODE">Postcode:</label>
                          <input type="text" class="form-control" name="CUST_POSTCODE" id="CUST_POSTCODE" value="<?php echo $_SESSION['CUST_POSTCODE']; ?>" required>
                          <p class="text-danger"><small>* required.</small></p>
                        </div>