Model,view,control are not connecting

Hello

I create modal MyloginForm:-




<?php

    class MyloginForm extends CFormModel

    {

        public $email;

        public $password;

        

        private $_identity;

        public function rules()

            {

                return array

                (

                    array('email,passwor','required'),

                    array('email,password',authenticate)

                );

            }

      public function authenticate($attribute,$params)

            {

                $this->_identity=new UserIdentity($this->email,  $this->password);

                if ($this->_identity->authenticate()) 

                    {

                        $this->addError('password', 'Incorrect Email Or Password');

                    }

            }

    }

?>



the Contoller Login Controller:-




<?php

    class LoginController extends Controller

        {

            public function actionMylogin()

                {

                    $model= new MyloginForm;

                    if(isset($_POST['MyloginForm']))

                        {

                            $model->attributes=$_POST['MyloginForm'];

                        

                            if($model->validate())

                             {

                                 $this->redirect(yii::app()->user->returnUrl);

                             }

                        }

                        $this->render('mylogin',array('model'=>$model));

                }

        }

?>



Then Form mylogin:-




<h1>Login</h1>


<div class="form">

<?php echo CHtml::beginForm(); ?>

 

    <?php echo CHtml::errorSummary($model); ?>

 

    <div class="row">

        <?php echo CHtml::activeLabel($model,'email'); ?>

        <?php echo CHtml::activeTextField($model,'email') ?>

    </div>

 

    <div class="row">

        <?php echo CHtml::activeLabel($model,'password'); ?>

        <?php echo CHtml::activePasswordField($model,'password') ?>

    </div>

 

    <div class="row submit">

        <?php echo CHtml::submitButton('Login'); ?>

    </div>

 

<?php echo CHtml::endForm(); ?>

</div><!-- form -->



But it not coming on my browser It Gives

Error 404

The system is unable to find the requested action "pages".

what should i do to run it

once you have setup the action and controller, point your browser to login/mylogin

First of all use "Insert code snippet" [<>] for your code to make it easier to read.

You get this error because there is no method called actionPages in the controller and this is the action you are calling with the url you typed in browser.