V → C, C → M, M → C , + + . , . , -, MVC .
, , , "webform" codeigniter. , validate(), process(), display() .
.
class User_controller
{
function login()
{
$form = new LoginForm();
if ($form->validate())
{
$data = $this->user_model->getUserData( $form->userid );
} else {
$form->display();
}
}
}
. , :
, -
$ this-> load-> form ("Input"); ......
However, this is just a suggestion that is useful for the codeigniter command.
source
share