xmas12 Posted February 17, 2010 Report Share Posted February 17, 2010 Sveiki, varbuut kāds var palīdzēt uzlikt md5 šitiem script ? Es salieku bet viniem neko neraada, logojoties rad kad dati nav pareizi! Un reģistrēties arī vairs nevar kad ir uzlikts md5 . Lūdzu palīdzat : Register.php : http://paste.php.lv/535691a9e9619f7dbb3a2dc0c80c0fe6?lang=php Login.php : http://paste.php.lv/94eda4988d31ab371bd47c370f7c275a?lang=php Quote Link to comment Share on other sites More sharing options...
2easy Posted February 17, 2010 Report Share Posted February 17, 2010 kad inserto paroli, vispirms tabulā vajag lauku: Parole binary(32) NOT NULL pēc tam reģistrējoties pašā sql INSERT raksta: "'" . md5($_POST['parole']) . "'" kad salīdzina login paroli ar db paroli tad arī atceras par md5(): md5($_POST['parole']) == $parole_no_db_ar_md5 Quote Link to comment Share on other sites More sharing options...
xmas12 Posted February 17, 2010 Author Report Share Posted February 17, 2010 Pēdējos divus punktus nesapratu.. :( Quote Link to comment Share on other sites More sharing options...
2easy Posted February 17, 2010 Report Share Posted February 17, 2010 (edited) paskaties manuālī md5() varbūt nemaz nevajag cīnīties ar md5, ja ir par grūtu? nokriptēt paroles varēsi arī vālāk, kad kļūsi gudrāks Edited February 17, 2010 by 2easy Quote Link to comment Share on other sites More sharing options...
edi Posted February 17, 2010 Report Share Posted February 17, 2010 (edited) login kaut ka ta http://paste.php.lv/a3b68ecec914a329618b7cd5fefb9e33?lang=php , register $password = md5($_POST["password"]); .. $query = "INSERT INTO tb_users (username, password, ip, email, referer, country, joindate) VALUES('$username','$password','$laip','$email','$referer','$country','$joindate')"; ne? :D EDIT: db neaizmirsti ka parole md5 32 simb gara Edited February 17, 2010 by edi Quote Link to comment Share on other sites More sharing options...
2easy Posted February 17, 2010 Report Share Posted February 17, 2010 edi tajā login pārbaudē paroles pārbaudi arī var likt WHERE daļā. vnk pēc tam būs mazāk jāpārbauda. tā jau ideja pareiza ;) es jau gribēju, lai xmas12 to pats izdomā, tāpēc nerakstīju visu priekšā :P Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.