protected function savepass()
 {
     $required = array("current" => "Current Password", "new" => "New Password");
     foreach ($required as $key => $value) {
         if (!isset($_POST[$key]) || $_POST[$key] == '' || $_POST[$key] == 'select') {
             echo $value . ' is Required<br/>';
             return;
         }
     }
     global $user;
     global $objPDO;
     $student = new student($objPDO, $user->getuserId());
     if (md5($_POST['current']) == $student->getPassword()) {
         $student->setPassword(md5($_POST['new']));
         $student->save();
     } else {
         echo 'The Current Password is Wrong';
         return;
     }
     echo '<meta http-equiv="Refresh" content="0;url=http://localhost/cloud/profile"/>';
 }