Trouble Logging In my Application "Invalid Login" - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Trouble Logging In my Application "Invalid Login" (/showthread.php?tid=68858) |
Trouble Logging In my Application "Invalid Login" - Maijane - 09-05-2017 I have built an application and am having a problem with login, which I can't identify but I believe it might come from my model when I try to log in I get unsuccessful message, I believe I can read database but don't know where the problem is Here is my code Controller Code: public function index(){ Model Code: function get_data($table, $fields, $condition,$orderby=NULL) { Database Code: -- RE: Trouble Logging In my Application "Invalid Login" - rtenny - 09-05-2017 There is something wrong with you if in the model if($cnt>0){ you are mixing if with and without curly bracktet. Start using proper formatting style and you will not suffer with undefined issues in you logic. Allway use {} so you can easily understand what going on. RE: Trouble Logging In my Application "Invalid Login" - rtenny - 09-05-2017 http://www.php-fig.org/psr/psr-2/ RE: Trouble Logging In my Application "Invalid Login" - InsiteFX - 09-06-2017 Also you should not be using MD5 for hashing your passwords. See the php.net password_hash functions RE: Trouble Logging In my Application "Invalid Login" - rtenny - 09-07-2017 @InsiteFX good catch, I did not see that. And fully agree nobody should store password hash as MD5. They are far to easy to break. RE: Trouble Logging In my Application "Invalid Login" - PaulD - 09-07-2017 Lol - yeah check this https://hashkiller.co.uk/md5-decrypter.aspx |