SkyD Posted March 2, 2006 Report Share Posted March 2, 2006 Nu apnicis man tas mail, jau, bet tomēr vajadzīgs. Vienmēr kā viņam no jauna pieķeros klāt rodas problēmas. Atkal nevar dabūt garumzīmes un html'u. $headeris .= "Content-Type: text/html; charset=window-1257"; Vienkārši tas mēsls neiet. Kādi vispār tie carset ir? Kādi der LV valodai? Link to comment Share on other sites More sharing options...
Kavacky Posted March 2, 2006 Report Share Posted March 2, 2006 Iesākumam: Windows beidzas ar "s". Link to comment Share on other sites More sharing options...
SkyD Posted March 2, 2006 Author Report Share Posted March 2, 2006 Nu jā, to ar pamanīju, vienalga neiet. Link to comment Share on other sites More sharing options...
Klez Posted March 3, 2006 Report Share Posted March 3, 2006 (edited) domaju ka te http://php.lv/f/index.php?s=&showtopic=412...indpost&p=33319 var rast risinaajumu :) suuti to mailu utf8 kodeejuma meegini caur soketiem suutiit ;) Edited March 3, 2006 by Klez Link to comment Share on other sites More sharing options...
v3rb0 Posted March 3, 2006 Report Share Posted March 3, 2006 vai arī sūti ar šito - http://phpmailer.sourceforge.net/ Link to comment Share on other sites More sharing options...
SkyD Posted March 3, 2006 Author Report Share Posted March 3, 2006 Nu man labaak dereetu, ja buutu tikai ar mail($kam, $subj, $txt, $no, $headeri); un viss. Bet headeri kārtīgi nestrādā. Vēl man jaut, kas ir \n un \r ? Taču ar charset=windows-1257 vajadzeetu straadaat, bet neiet. Link to comment Share on other sites More sharing options...
SkyD Posted March 3, 2006 Author Report Share Posted March 3, 2006 Viss ok, tag. Ja kādam noder, tad ņemiet par labu. $headers = "From: bla@blah.lv\r\n"; $headers .= 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-Type: text/html; charset=windows-1257' . "\r\n"; $headers .= 'Content-Transfer-Encoding: 7bit'; Tagad vajag man zināt, kā pēc iespējas drošāku taisīt logošanos iekšā. Lūdzu pastāstiet. Domāju, ka ar mysql_num_rows(); nekas īsti droš tur nesanāk. Link to comment Share on other sites More sharing options...
GedroX Posted March 3, 2006 Report Share Posted March 3, 2006 (edited) Tagad vajag man zināt, kā pēc iespējas drošāku taisīt logošanos iekšā. Parādi, kā tu to dari, mēs tevi palabosim. Ja nepalabosim, vismaz palamāsim vai apsmiesim, kā jau visos mūsu forumos. :p Edited March 3, 2006 by GedroX Link to comment Share on other sites More sharing options...
SkyD Posted March 3, 2006 Author Report Share Posted March 3, 2006 reeciet bez zheelsirdiibas..=DD~~ $sk = mysql_num_rows($izvilktais); if ($num < 1) { echo 'Dirsaa ir. Šitā adrese drīz būs HACK.'; } Link to comment Share on other sites More sharing options...
v3rb0 Posted March 3, 2006 Report Share Posted March 3, 2006 if ($num < 1) vietā if ($num != 1), respektīvi arī tad ja no db dabūsi divus un vairāk userus kaut kas nebūs riktīgi. Link to comment Share on other sites More sharing options...
bubu Posted March 3, 2006 Report Share Posted March 3, 2006 num_rows vajag aizmirst. $user = ....; $pass = md5(....); $q = mysql_query("SELECT COUNT(*) FROM tabule WHERE user='$user' AND pass='$pass'"); list($count) = mysql_fetch_row($q); if ($count!=1) { // hackors } else { //viss ok }; Link to comment Share on other sites More sharing options...
v3rb0 Posted March 3, 2006 Report Share Posted March 3, 2006 (edited) es ar visu laiku taisīju ar count(*), bet parasti pie logina vajag dabūt arī vismaz usera id. tad kāpēc uzreiz nemēģināt izselectēt useri, ja ir tieši viens useris, tad ok, ja neviens vai 100 tad nav labi. ar count(*), ja būs useris, vienalga būs vēlviens kverijs jātaisa lai dabūtu usera id [un pārējo ko nu vajag]. ..un izselektēti 100 useri ar pareizu db (username unikāls) un argumentu validēšanu(nav tukš, nav sql injekcija) nekad nevar būt. Edited March 3, 2006 by v3rb0 Link to comment Share on other sites More sharing options...
SkyD Posted March 3, 2006 Author Report Share Posted March 3, 2006 Hmm. Interesanta lieta parādijās. Tātad štelle tāda, ka uz exploreri un operu sessijas uzstāda, bet tikai explorerim var noņemt. Pie login pārbaudes: session_start(); $_SESSION['logins'] = $lvards; Ejot aaraa: session_start(); unset($_SESSION['logins']); .. Kas pa lietu?! Link to comment Share on other sites More sharing options...
bubu Posted March 3, 2006 Report Share Posted March 3, 2006 es ar visu laiku taisīju ar count(*), bet parasti pie logina vajag dabūt arī vismaz usera id. $q = mysql_query("SELECT id, COUNT(*) FROM tabule WHERE user='$user' AND pass='$pass' GROUP BY id"); Link to comment Share on other sites More sharing options...
v3rb0 Posted March 3, 2006 Report Share Posted March 3, 2006 (edited) vai tad SELECT id, COUNT(*) FROM tabule WHERE user='$user' AND pass='$pass' GROUP BY id neatgriedīs nulle rindas ja būs nepareizs useris/parole? Edited March 3, 2006 by v3rb0 Link to comment Share on other sites More sharing options...
Recommended Posts