[eluser]Ram Krishna[/eluser]
i have the controller code
Code:
<?php
class Client extends CI_Controller {
function login()
{
$this->load->library('form_validation');
IF($this->input->post('submit'))
{
$this->load->library('form_validation');
$this->form_validation->set_rules('user_name','User Name','required');
$this->form_validation->set_rules('password','Password','required');
$this->form_validation->set_rules('user_type','User Type','required');
IF($this->form_validation->run()=FALSE)
{
$this->load->view('client_login_form');
}
else
{
$this->load->model('login_model');
$row=$this->login_model->login();
IF($row==1)
{
echo "You have been successfully logged in"
}
else
{
echo 'wrong username or passwrod";
$this->load->view('client_login_form');
}
}
}
else
{
$this->load->view('client_login_form');
}
}
}
?>
It is giving error-
Fatal error: Can't use method return value in write context in /opt/lampp/htdocs/crm/application/controllers/client.php on line 12.
i am unable to understand mistake.