application/controllers/Dashboard.php
//this is the page for recovering account
this is the page for recovering account
this is the page for recovering account
public function recoverAccount(){
	 		$data['username'] = $_POST['name'];
			$data['hint'] = $_POST['hint'];
			$return = $this->dashboard_model->adminLogin($data);
			if ($return != false) {
				$ret = $this->dashboard_model->accountRecovery($data);
				if ($ret != false) {
					$msg['msg'] = "True";
					$msg['id'] = $ret['id'];
				}else{
					$msg['msg']  = "Incorrect hint!";
				}
			}else{
				$msg['msg']  =  "Username not found!";
			}
	 		echo json_encode($msg);
	 	}
public function recoverAccount ( ) { $ data [ 'username' ] = $ _POST [ 'name' ] ; $ data [ 'hint' ] = $ _POST [ 'hint' ] ; $ return = $ this -> dashboard_model -> adminLogin ( $ data ) ; if ( $ return != false ) { $ ret = $ this -> dashboard_model -> accountRecovery ( $ data ) ; if ( $ ret != false ) { $ msg [ 'msg' ] = " True " ; $ msg [ 'id' ] = $ ret [ 'id' ] ; } else { $ msg [ 'msg' ] = " Incorrect hint! " ; } } else { $ msg [ 'msg' ] = " Username not found! " ; } echo json_encode ( $ msg ) ; }
this is the page for recovering account
this is the page for recovering account