Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function login()
- {
- $this->load->library('trinity');
- $this->load->library('session');
- $username = $this->input->post('accname');
- $password = $this->input->post('accpw');
- if($this->session->userdata('logged_in'))
- {
- show_error('You are already logged in!');
- }
- else
- {
- $this->trinity->Login($username, $password);
- redirect('home');
- }
- }
- (Controller's function)
- <form action="" method="post">
- <input class="inp1" type="text" name="accname" value="accname" />
- <input class="inp1" type="password" name="accpw" value="accpw" />
- <a href="/home/login"><img border="none" src="/themes/toxic2/images/buttons/login.png"/></a>
- </form>
- (View's form)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement