SkyD Posted December 25, 2005 Report Share Posted December 25, 2005 Ir login.php Skatīt šeit: http://paste.php.lv/3018 Uztaisiju vēl, lai no mysql izvelk visus ierakstus, kas ir tabulā.. Nu ir ok, viss uzrādās, un parole ir šada ar md5: 009a50b8bbd5a1359e6738ea385e7c, bet, kad ierakstu formā, tad viņa pārtaisās uz: nav ievadiji: tests un 009a50b8bbd5a1359e6738ea385e7c77 Līdz ar to neielogojas! Link to comment Share on other sites More sharing options...
bubu Posted December 25, 2005 Report Share Posted December 25, 2005 (edited) Cik maksimāli atļautais garums ir "parole" laukam tabulā? Ceru, ka 32 simboli ir? Citādi pēc tava piemēra izskatās, ka tev tur izvelk tikai 30 simbolus. Edited December 25, 2005 by bubu Link to comment Share on other sites More sharing options...
SkyD Posted December 25, 2005 Author Report Share Posted December 25, 2005 uj... !! toch!! Link to comment Share on other sites More sharing options...
SkyD Posted December 25, 2005 Author Report Share Posted December 25, 2005 Es uzliku VARCHAR(100). Nu lab uzrāda abos vienādas paroles, bet vienalga saka, ka nepareizi! Nav. Tu ievadiji: tests un d455711222d312734fb4f04237aaace3 Lietotajvārds | Parole tests | d455711222d312734fb4f04237aaace3 Link to comment Share on other sites More sharing options...
Vebers Posted December 25, 2005 Report Share Posted December 25, 2005 (edited) Lietotajvārds | Paroletests | d455711222d312734fb4f04237aaace3 ------------------- SELECT * FROM reg WHERE lietotajvards='$sesija1' AND parole='$sesija2' lietotajvārds != lietotajvards un Parole != parole Edited December 25, 2005 by MakaTaNaw Link to comment Share on other sites More sharing options...
bubu Posted December 25, 2005 Report Share Posted December 25, 2005 (edited) SkyD, nafig tur VARCHAR(100)? md5 taču vienmēr būs CHAR(32). Pie tam, mēģināji mysql_error() pārbaudīt? E_ALL ir vispār uzlikts? Edited December 25, 2005 by bubu Link to comment Share on other sites More sharing options...
SkyD Posted December 25, 2005 Author Report Share Posted December 25, 2005 Nu tag ir viss ok!! vo es tik ar tiem VARCHAR nesaprotu..!! Kas un kā ar viņiem ir?? Link to comment Share on other sites More sharing options...
bubu Posted December 25, 2005 Report Share Posted December 25, 2005 A kas tad ar viņiem ir? Link to comment Share on other sites More sharing options...
SkyD Posted December 25, 2005 Author Report Share Posted December 25, 2005 Cik tie VARCHAR jaliek? 1varchar apziimee 1simbolu?? Link to comment Share on other sites More sharing options...
bubu Posted December 25, 2005 Report Share Posted December 25, 2005 Kā lai es zinu, cik tev jāliek? Tikpat labi tu varēji te prasīt, cik kilogramus siera tev veikalā jāpērk. Palasi šo varbūt: http://dev.mysql.com/doc/refman/5.0/en/char.html Link to comment Share on other sites More sharing options...
php_Stopp Posted December 25, 2005 Report Share Posted December 25, 2005 varchar(32) vienk paroles laukiem nav jēgas likt vairāk/mazāk par 32 simboliem, jo jebko apstrādājot ar md5 iegūst 32 simbolus. Link to comment Share on other sites More sharing options...
bubu Posted December 25, 2005 Report Share Posted December 25, 2005 php_Stopp, un kāda jēga no varchara tur? char(32) tak vajag. Gan ātrāk tas būs, gan ietaupīsi 1 baitu uz ierakstu. Jūs cilvēki laikam dokumentācijas nekad nelasat ;) Link to comment Share on other sites More sharing options...
php_Stopp Posted December 25, 2005 Report Share Posted December 25, 2005 nu jā, char :P Link to comment Share on other sites More sharing options...
SkyD Posted December 25, 2005 Author Report Share Posted December 25, 2005 Kad regojas, kaa lai parbauda vai ir jau lietotajvards??? Link to comment Share on other sites More sharing options...
bubu Posted December 25, 2005 Report Share Posted December 25, 2005 if (ir_jau_lietotajvards) { echo "ir jau"; } else { echo "nav"; } Link to comment Share on other sites More sharing options...
Recommended Posts