Advertisement
Guest User

Untitled

a guest
Sep 20th, 2017
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. public function login()
  2. {
  3. $this->load->library('trinity');
  4. $this->load->library('session');
  5. $username = $this->input->post('accname');
  6. $password = $this->input->post('accpw');
  7. if($this->session->userdata('logged_in'))
  8. {
  9. show_error('You are already logged in!');
  10. }
  11. else
  12. {
  13. $this->trinity->Login($username, $password);
  14. redirect('home');
  15. }
  16. }
  17.  
  18. (Controller's function)
  19.  
  20. <form action="" method="post">
  21. <input class="inp1" type="text" name="accname" value="accname" />
  22. <input class="inp1" type="password" name="accpw" value="accpw" />
  23. <a href="/home/login"><img border="none" src="/themes/toxic2/images/buttons/login.png"/></a>
  24. </form>
  25.  
  26. (View's form)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement