![]() |
Authenticating a User through Login - 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: Authenticating a User through Login (/showthread.php?tid=12452) |
Authenticating a User through Login - El Forum - 10-19-2008 [eluser]Gwarrior[/eluser] Referring to this Thread, I suppose I am completely unable to authenticate a login. I mean, it seemed pretty simple - just query the DB for password where username = suppliedusername, then compare the requested password with the submitted password, but that doesn't seem to be working, at all. Can someone just lay it out for me, how I am supposed to authenticate a user (I have used PHP for 2 years while NEVER using sessions/cookies for some reason)? Either in layman's, or code-wise. p.s. Below is my code: Controller: Code: <?php Model: Code: <?php For some reason, it works, but just gives me failure no matter what... Authenticating a User through Login - El Forum - 10-20-2008 [eluser]dalebotha[/eluser] Hi I'm a relative new comer to CI and Php in general but my database queries have gone something like this: Code: function get_password($username) { I'm too unfamiliar with CI check the rest of your code and whether your database interaction is syntactically correct but this is how I've been doing my db stuff. I hope this helps. ![]() Dale Authenticating a User through Login - El Forum - 10-20-2008 [eluser]Bramme[/eluser] Google 'codeigniter auth tutorial' ![]() |