Grey_Wolf Posted November 28, 2005 Report Share Posted November 28, 2005 manupraat dazosh gadijumos (teiksim useru komentri) optimaals ir shaads variants: seesiion..... parbaudam vai sesijaa ir mainiigais $X ja nav izveidojam parbaudam postu un rakstam ieksaa DB ierakstam $X pirmos 50-100 simbolus no _POSTU['teksta_lauks'] -------- ja maniigais $x ir nolasam vinju no sessijas parbaudam _POSTU['teksta_lauks'] un saliidzinam taa pirmos 50-100 simbolus ar $x ja sakriit taatad tas ie refresxx ja nesakriit tad.parbaudam postu un rakstam ieksaa DB ierakstam $X pirmos 50-100 simbolus no _POSTU['teksta_lauks'] -------- klaat vel var pielikt fluud kontroli :) parbaudiit tiesh tekstu, jo var gadiities ka uuseris grib pievienot citu tekstu ... apmeeram shadi: Link to comment Share on other sites More sharing options...
bubu Posted November 28, 2005 Report Share Posted November 28, 2005 Nav vērts piemēslot sesiju ar 50-100 posta datiem. Vienkāršāk md5($_POST['teksta_lauks']) un miers. Link to comment Share on other sites More sharing options...
Klez Posted November 28, 2005 Report Share Posted November 28, 2005 (edited) man lapaa ir variants ... if ($_SESSION['komenta_md'] != md5($_POST['text'])){ //saglabaajam textu kur vaig $_SESSION['komenta_md'] = md5($_POST['text']); } Edited November 28, 2005 by Klez Link to comment Share on other sites More sharing options...
php_Stopp Posted November 28, 2005 Report Share Posted November 28, 2005 vai nu divi faili (1 ar formu, viens apstrādes), vai arī viens fails un tad forma iet uz piem fails.php?apstrade un failā ir if (isset($_GET['apstrade']) && $_SERVER['REQUEST_METHOD']=='POST') { // apstrādājam datus header("Location: fails.php"); } Link to comment Share on other sites More sharing options...
blackhalt Posted November 28, 2005 Report Share Posted November 28, 2005 Grey_Wolf, nu kā. die("<script type=\"text/javascript\">window.location='./index.php?$liek#com';</script><title>...mirst...</title></head><body bgcolor=\"#3A6EA5\"><noscript><meta http-equiv=\"refresh\" content=\"0; url=./index.php?$liek#com\"></noscript></body></html>"); + tiek pārbaudīts vai posts nav == ar iepriekšējo ;) Link to comment Share on other sites More sharing options...
Grey_Wolf Posted November 28, 2005 Report Share Posted November 28, 2005 (edited) blackhalt--> galiigi nesapratu tavu domu gajienu :( kas tas par sviestu? P.S. es to piemeeru rakstiju 'pa taisno' iespeejams ka tur arii ir kas lieks...... Edited November 28, 2005 by Grey_Wolf Link to comment Share on other sites More sharing options...
bubu Posted November 28, 2005 Report Share Posted November 28, 2005 Tikai retais saprot blackhalt, un tas tāpat nāk ar laiku tikai.. Link to comment Share on other sites More sharing options...
Tamriel Posted November 29, 2005 Report Share Posted November 29, 2005 Bubu, paskaidro luudzu tuvaak, mazbiku neiebraucu: "Nav vērts piemēslot sesiju ar 50-100 posta datiem. Vienkāršāk md5($_POST['teksta_lauks']) un miers." Link to comment Share on other sites More sharing options...
Vebers Posted November 29, 2005 Report Share Posted November 29, 2005 Tamriel, md5 kodees to tekstu kuru dod caur $_POST un tad teksts ko liks sesijaa buus liidz 15 simboliem (isti neatceros cik simboli bija md5), bet taa sesijaa buus lieks teksta daudzums (lidz ar to dati baiti vairaak [ekonomika]).. Link to comment Share on other sites More sharing options...
blackhalt Posted November 29, 2005 Report Share Posted November 29, 2005 Ai da nevajag nekādas sesijas tur kurbulēt. Link to comment Share on other sites More sharing options...
bubu Posted November 29, 2005 Report Share Posted November 29, 2005 Bubu, paskaidro luudzu tuvaak, mazbiku neiebraucu: Paskaties uz Klez topiku aiz manējā. Tieši to arī biju domājis. Tamriel, md5 kodees to tekstu ... md5 neko nekodē. Link to comment Share on other sites More sharing options...
Vebers Posted November 29, 2005 Report Share Posted November 29, 2005 md5 neko nekodē. nu ja pareizi "md5 hash" Link to comment Share on other sites More sharing options...
Recommended Posts