<?php
include_once('inc.function.php');
include_once('confdb.php');
$result3 = mysqli_query($con,"SELECT * FROM config_countries ORDER BY COUNTRY_NAME");
$result4 = mysqli_query($con,"SELECT * FROM config_countries ORDER BY COUNTRY_NAME");
?>
                       <div class="alert alert-info" role="alert"><span class="glyphicon glyphicon-ok-sign"></span> Please fill up the details below</div>
                        <div class="form-group">
                          <label for="NAME">Name:</label>
                          <input type="text" class="form-control" name="CLIENT_NAME" id="CLIENT_NAME"  value = "<?php echo $_SESSION['CLIENT_NAME']; ?>" required>
                          <p class="text-danger"><small>* required.</small></p>
                        </div>

                        <div class="form-inline">
                          <label for="TELEPHONE">Telephone:</label>

                              <select name="TELEPHONE_CCC" id="TELEPHONE_CCC" class="form-control" required>
                              <option value="0">-- Please Select --</option>
                              <option value="+6" <?php if ($_SESSION['TELEPHONE_CCC'] == "+6") { echo 'selected="selected"'; } ?>>MALAYSIA (+6)</option>
                                <?php                 
                                  while($row3 = mysqli_fetch_array($result3)) 
                                  { 
                                ?>
                               <option value="<?php echo $row3['COUNTRY_CALLING_CODE']; ?>" <?php if ($_SESSION['TELEPHONE_CCC'] == $row3['COUNTRY_CALLING_CODE']) { echo 'selected="selected"'; } ?>>
                                <?php echo $row3['COUNTRY_NAME'].'(+'.$row3['COUNTRY_CALLING_CODE'].')'; ?>
                              </option>
                                <?php } ?>
                              </select>


                          <input type="text" class="form-control" name="CLIENT_TELEPHONE" id="CLIENT_TELEPHONE" value = "<?php echo $_SESSION['CLIENT_TELEPHONE']; ?>" required>
                        </div>

                       <br>

                        <div class="form-inline">
                          <label for="HANDPHONE">Handphone:</label>

                              <select name="HANDPHONE_CCC" id="HANDPHONE_CCC" class="form-control" required>
                              <option value="0">-- Please Select --</option>
                              <option value="+6" <?php if ($_SESSION['HANDPHONE_CCC'] == "+6") { echo 'selected="selected"'; } ?>>MALAYSIA (+6)</option>
                                <?php                 
                                  while($row3 = mysqli_fetch_array($result3)) 
                                  { 
                                ?>
                               <option value="<?php echo $row3['COUNTRY_CALLING_CODE']; ?>" <?php if ($_SESSION['HANDPHONE_CCC'] == $row3['COUNTRY_CALLING_CODE']) { echo 'selected="selected"'; } ?>>
                                <?php echo $row3['COUNTRY_NAME'].'(+'.$row3['COUNTRY_CALLING_CODE'].')'; ?>
                              </option>
                                <?php } ?>
                              </select>


                          <input type="text" class="form-control" name="CLIENT_TELEPHONE2" id="CLIENT_TELEPHONE2" value = "<?php echo $_SESSION['CLIENT_TELEPHONE2']; ?>" required>
                        </div>


                        <br>
                          
                          <div class="form-inline">

                          <label for="FAX">Fax:</label>
                              <select name="FAX_CCC" id="FAX_CCC" class="form-control">
                              <option value="0">-- Please Select --</option>
                              <option value="+6" <?php if ($_SESSION['FAX_CCC'] == "+6") { echo 'selected="selected"'; } ?>>MALAYSIA (+6)</option>
                                <?php                 
                                  while($row4 = mysqli_fetch_array($result4)) 
                                  { 
                                ?>
                               <option value="<?php echo $row4['COUNTRY_CALLING_CODE']; ?>" <?php if ($_SESSION['FAX_CCC'] == $row4['COUNTRY_CALLING_CODE']) { echo 'selected="selected"'; } ?>>
                                <?php echo $row4['COUNTRY_NAME'].'(+'.$row4['COUNTRY_CALLING_CODE'].')'; ?>
                              </option>
                                <?php } ?>
                              </select>
                          <input type="text" class="form-control" name="CLIENT_FAX" id="CLIENT_FAX"  value = "<?php echo $_SESSION['CLIENT_FAX']; ?>">
                        
                        </div>
                        </div>

                        <br><br>

                        <div class="form-inline">

                        </div>
  
                        