here is my controller file and view file of admin login section in codeignitor. all helpers files are present in root folder\system\helpers in frontend end it's ok, but in admin section it's showing the following error
Fatal error: Call to undefined function form() in D:\wamp\www\CodeIgniter\application\views\admin\catalog\catalog_view.php on line 4
I think we have to change something in or anything else???
D:\wamp\www\CodeIgniter\application\controllers\admin\catalog.php
<?php
/**
* Admin Catalog Controller
*/
class Catalog extends CI_Controller
{
function index()
{
$this->load->helper(array('form', 'url'));
$this->load->library('form_validation');
$this->load->view('admin/templates/header');
$this->form_validation->set_error_delimiters('<div class="error">', '</div>');
$this->load->database();
$this->form_validation->set_rules('email', 'Email', 'required|valid_email');
$this->form_validation->set_rules('password', 'Password', 'required|valid_email');
if ($this->form_validation->run() == FALSE)
{
$this->load->view('admin/catalog/catalog_view');
}
else
{
$this->form1_model->admin_login();
$this->load->view('admin/catalog/home_view');
}
$this->load->view('admin/templates/footer');
//$html_string = $this->load->view('admin/catalog/catalog_view');
}
}
D:\wamp\www\CodeIgniter\application\views\admin\catalog\catalog_view.php
<?php if (!defined('BASEPATH')) exit(__('No direct script access allowed')); ?>
<div class="light_blue_back" align="center">
<div class="adminbox">
**<?php echo form('adminform'); ?>**
<fieldset>
<legend><b>Admin Login</b></legend>
<dl>
<dt>
<label for="street_address1"> <span class="req">*</span>Email</label>
</dt>
<dd>
<input type="text" name="email" id="email" value=""/>
</dd>
</dl>
<dl>
<dt>
<label for="street_address2">Password</label>
</dt>
<dd>
<input type="password" name="password" id="password" value=""/>
</dd>
</dl>
<dl>
<dt>
</dt>
<dd>
<input type="submit" value="Submit" name="reg_sub" id="reg_sub"/>
<input type="reset" name="reg_reset" id="reg_reset" value="Reset" />
</dd>
</dl>
</fieldset>
</form>
</div>
</div>
form_open()notform(). Looking at the docs, there seems not to be anyform()function defined. - user9645