<?php

date_default_timezone_get();
require_once("includes/initialize.php");
$alldept = EDITING:: showdept();
$output = '';
if(isset($_POST["formno"]))  
 {
     echo $formno = $_POST["formno"];
    $get = EDITING:: check_students($formno);


    echo '<div class="container">
            <div class="masthead">
             <form class="form-horizontal" action="" name="form" method="post" enctype="multipart/form-data">
                    <div class="form-group">
                        <label class="col-sm-5 control-label">FULL NAME :</label>
                        <div class="col-sm-4">
                          <input type="text" name="surname" class="form-control" value="'.$get->names;'" placeholder="" required="required">
                        </div>
                      </div>
                      <div class="form-group">
                      <label class="col-sm-5 control-label">DEPARTMENT :</label> 
                      <div class="col-sm-4">                 
                          <select name="department" id="department" class="form-control action" style="width:150px">
                              <option value="'.$dept;'">'.$dept;'</option>'
                              foreach($alldept as $dep){
                              '<option value="'.$dep->department;'">' ucwords($dep->department);'</option>' }
                          '</select>
                      </div>
                      </div>
                      <div class="form-group">
                        <label class="col-sm-5 control-label">STATUS :</label>
                        <div class="col-sm-4">
                        <input type="text" name="status" class="form-control" value="<?php echo $get->status;?>" placeholder="" required="required">
                        </div>
                      </div>
                    <div class="form-group">
                      <label class="col-sm-4 control-label"></label>
                      <div class="col-sm-8">
                        <input type="submit" name="update" class="btn btn-success" value="Update">
                      </div>
                    </div>
                  </form>
              </div>
          </div>';
          
 }
    ?>