Login Form. Using a MVC pattern. Help. - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Login Form. Using a MVC pattern. Help. (/showthread.php?tid=51669) |
Login Form. Using a MVC pattern. Help. - El Forum - 05-13-2012 [eluser]theif_of_always[/eluser] Problem: When I input a username or password. Nothing really happens. Or at least I don't think so. I keep getting same non-response or maybe I am just misdirecting it? My code is below. I am not worried about hashing it at the moment, just want to get this to work properly first. Thanks in advance! MY CONTROLLER: Code: public function login() { MY MODEL Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); MY VIEW Code: <?php Login Form. Using a MVC pattern. Help. - El Forum - 05-13-2012 [eluser]Samus[/eluser] This line: Code: if($this->form_validation->run() == FALSE) Login Form. Using a MVC pattern. Help. - El Forum - 05-13-2012 [eluser]emily12[/eluser] In the future, consider debugging like echo "works"; or echo "failed";. I like to sometimes dig into the core files and play with them and print arrays from them, which helped tremendously with the form validation (which had a mistake in the original code... i forgot what line though). Switching FALSE to TRUE seems reasonable enough. But if it doesn't work, use echo instead of redirect and see what happens. Login Form. Using a MVC pattern. Help. - El Forum - 05-13-2012 [eluser]Samus[/eluser] [quote author="emily12" date="1336900493"]In the future, consider debugging like echo "works"; or echo "failed";. I like to sometimes dig into the core files and play with them and print arrays from them, which helped tremendously with the form validation (which had a mistake in the original code... i forgot what line though). Switching FALSE to TRUE seems reasonable enough. But if it doesn't work, use echo instead of redirect and see what happens.[/quote] I've never had a problem with it. And even if you did (which I doubt) it's better to extend the library than edit the actual core. |