[eluser]malcomhfc[/eluser]
Hi there. Im a little new to php and codeigniter. Although i have background in other programming languages.
I am using the Ion auth library and im making an admin panel for administrating my website.
I have the main controller admin which extends a core controller Admin_controller. - based on phil surdgens blog posts.
The Admin_controller checks for permissions etc in the admin panel. Im trying to make a login page. For example if not logged in then load function login()
but I cant seem to make a login form on my view work with
Code:
$this->ion_auth->login
I tried copying the login function from the example auth controller but it gave me errors
Quote:Message: Undefined variable: email
the view is:
Code:
<?php echo form_open("admin/login");?>
<p>
<label for="email">Email:</label>
<?php echo form_input($email);?>
</p>
<p>
<label for="password">Password:</label>
<?php echo form_input($password);?>
</p>
<p>
<label for="remember">Remember Me:</label>
<?php echo form_checkbox('remember', '1', FALSE);?>
</p>
<p><?php echo form_submit('submit', 'Login');?></p>
<?php echo form_close();?>
i also tried
Code:
<?php echo form_open('admin/login'); ?>
<ul>
<li>
<input type="text" name="email" value="Email" />
</li>
<li>
<input type="password" name="password" value="Enter Password" />
</li>
<input type="submit" name="submit" value="Login" />
</ul>
<?php echo form_close(); ?>
Any help on a simple login form which will run the admin/login function correctly please? Any help would be greatly appretiated