Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form name='userlogin' action='<?php echo base_url();?>/index.php/myform/checkLogin' method='post'>
- <input type="text" name='username' id='username' class="form-control" placeholder="Username" style='height: 3em;'><br>
- <input type="password" name='password' id='password' class="form-control" style='height: 3em;' placeholder="Password" required><br>
- <center><button class="btn draw-border" type="submit" >Sign in</button></center>
- <center><br><a href= "/ci/index.php/myform/<?php echo "userRegistration";?>">Register</a></center>
- </form>
- public function showLogin(){
- $this->load->view('loginview');
- }
- public function checkLogin() {
- $user = $this->input->post('username');
- $pass = $this->input->post('password');
- $this->db->where('username', $user);
- $this->db->where('user_password', $pass);
- $this->successmessage();
- }
- NOTE: I'm not yet where I want to be to incorporate the sessions library. That's next. Now I need to wrap my head around the operation performed to match user login creds with DB table.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement