Help please on encryption |
[eluser]softtop[/eluser]
hey, this is the first time i have mucked around with php, iv got the uploadr script some one made on here working but i wanted the script to use a database i already have. Got it working out of the database i have but the mysql is encrytped with md5 and this script uses plain text passwords so im trying to convert it into md5, can some one please correct this code for me Uploader ; http://net.tutsplus.com/tutorials/php/cr...deigniter/ Orginal: $query = $this->db->get_where('e107_user', array('user_loginname'=>$username, 'user_password'=>$password)); New one i tryed editing : $query = $this->db->get_where('e107_user', array('user_loginname'=>$username, ('password'=> md5($password)); echo md5($password);
[eluser]toopay[/eluser]
Thats would be Code: $query = $this->db->where('user_loginname', $username) Code: // Remove spaces
[eluser]softtop[/eluser]
hmmm i seem to be getting this error now A Database Error Occurred Error Number: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE `user_loginname` = 'test' AND `user_password` = '179ad45c6ce2cb97cf1029e21' at line 2 SELECT * WHERE `user_loginname` = 'test' AND `user_password` = '179ad45c6ce2cb97cf1029e212046e81' Here is the whole document code Code: <?php
[eluser]toopay[/eluser]
Oops, i didn't include the table name, here you go Code: <?php
|
Welcome Guest, Not a member yet? Register Sign In |