My form:
<?php
echo validation_errors();
$clientLoginFormAttr = array('id'=>'clientLogin');
echo form_open('clientLogin',$clientLoginFormAttr);
## generate field attributes
$userNameInput=array(
'type' =>'text',
'id' => 'clientLogin',
'name' => 'clientUsername',
'maxlength' => '10',
'size' => '20'
);
$passwordInput=array(
'type'=>'password',
'id'=>'clientLogin',
'name'=>'clientPass',
'maxlength'=>'10',
'size'=>'20'
);
$submitBtn=array(
'type'=>'submit',
'id'=>'submit',
'value'=>'',
'name'=>'sendLogon'
);
## generate actual <input> fields
echo '<label>Username:</label>';
echo form_input($userNameInput);
echo '<label>Password:</label>';
echo form_input($passwordInput);
echo form_submit($submitBtn);
?>
I want to use the clientLogin controller which is in (controllers/pages/hndl/clientLogin.php)
clientLogin controller contains:
<?php
class Clientlogin extends CI_Controller{
function index(){
$this->load->helper(array('url','form'));
$this->load->library('form_validation');
$loginValidation = array(
array(
'field'=>'clientUsername',
'rules'=>'required|min_length[1]|max_length[10]'
),
array(
'field'=>'clientPass',
'rules'=>'required|min_length[1]|max_length[10]'
)
);
$this->form_validation->set_rules($loginValidation);
}
}
?>
When I visit my homepage (called homepage.php) set as default view to load, and press the SUBMIT button, it gives me the ERROR-404 OBJECT NOT FOUND. It goes to the path:
http://localhost/Applications/XAMPP/htdocs/website/homepage.php/clientLogin
What am I doing wrong here? I'm simply trying to use the clientLogin controller to control the form being submitted from homepage.php view. Thanks