Faks Posted October 12, 2010 Report Share Posted October 12, 2010 (edited) Labdien Dāmas Un Kungi Tātad Atkal pie mazas bēdas cēru uz radošām idejām . Šeit ir Video kurā ir parādits kāda ir tā problēma un cik specifiska viņa ir . http://faksx.sytes.net/help/ Varijanti Kuri Neder meta tagu refresh neder un tai skaitā ari header (); un exit() un die() . Edited October 12, 2010 by Faks Link to comment Share on other sites More sharing options...
Леший Posted October 12, 2010 Report Share Posted October 12, 2010 Ja neder header, tad samierinies ar šo gļuku. Link to comment Share on other sites More sharing options...
mounkuls Posted October 12, 2010 Report Share Posted October 12, 2010 Vienkārši pirms ievietošanas bāzē/failā ir jāparbauda vai tāds ieraksts jau nepastāv/nedublējas. Jāsalīdzina ar pēdējo(iem) ieraktstiem vai nesakrīt ar tiko nosūtīto. Jāuzseto tukši lauki lapā un pie refresha jāpārbauda arī vai tie nav tukši. Link to comment Share on other sites More sharing options...
Леший Posted October 12, 2010 Report Share Posted October 12, 2010 Jāuzseto tukši lauki lapā un pie refresha jāpārbauda arī vai tie nav tukši. Kas? Link to comment Share on other sites More sharing options...
mounkuls Posted October 12, 2010 Report Share Posted October 12, 2010 Ievadlaukiem mēdz palikt vecie value pie refreša ja nav no-cache Link to comment Share on other sites More sharing options...
Леший Posted October 12, 2010 Report Share Posted October 12, 2010 Un ar programmatūriskiem rīkiem iekš PHP tu to neapiesi. Pie tam, cilvēks jautā ne jau par to, bet par to, ko darīt, lai post dati netiktu nosūtīti vēlreiz, spiežot refresh. Tā, ka nezināmo iemeslu dēļ viņam neder header(), problēma nebūtu atrisināma. Link to comment Share on other sites More sharing options...
Faks Posted October 12, 2010 Author Report Share Posted October 12, 2010 Link to comment Share on other sites More sharing options...
briedis Posted October 12, 2010 Report Share Posted October 12, 2010 (edited) Uztaisi tokenu, kas ir derīgs tikai vienam submitam. <? if(isset($_POST['token'], $_SESSION['token']) && $_POST['token'] == $_SESSION['token']){ //Pievienojam komentāru. unset($_SESSION['token']); } $new_token = md5(time() . rand(0,100)); $_SESSION['token'] = $new_token; ?> <form method="post" action=""> <!--lauki šeit--> <input type="hidden" name="token" value="<?=$new_token;?>"/> </form> Nav testēts, bet būtu jāstrādā.. Edited October 12, 2010 by briedis Link to comment Share on other sites More sharing options...
Faks Posted October 12, 2010 Author Report Share Posted October 12, 2010 (edited) Uztaisi tokenu, kas ir derīgs tikai vienam submitam. <? if(isset($_POST['token'], $_SESSION['token']) && $_POST['token'] == $_SESSION['token']){ //Pievienojam komentāru. unset($_SESSION['token']); } $new_token = md5(time() . rand(0,100)); $_SESSION['token'] = $new_token; ?> <form method="post" action=""> <!--lauki šeit--> <input type="hidden" name="token" value="<?=$new_token;?>"/> </form> Nav testēts, bet būtu jāstrādā.. žel ka nestrādā . Edited October 12, 2010 by Faks Link to comment Share on other sites More sharing options...
briedis Posted October 12, 2010 Report Share Posted October 12, 2010 neticu, parādi kodu Link to comment Share on other sites More sharing options...
Леший Posted October 12, 2010 Report Share Posted October 12, 2010 (edited) Tas ir trollis. if(isset($_POST['token']) && $_POST['token'] == $_SESSION['token']){ //Pievienojam komentāru. Šo nesaprast nevarētu pat infuzorija. EDIT: $text = mysql_real_escape_string($_POST[text]); $text = htmlentities($_POST[text]); $text = trim($_POST[text]); Šo laikam tev iemācīja, kad liki to sertifikatu. Edited October 12, 2010 by Леший Link to comment Share on other sites More sharing options...
Faks Posted October 12, 2010 Author Report Share Posted October 12, 2010 Tas ir trollis. if(isset($_POST['token']) && $_POST['token'] == $_SESSION['token']){ //Pievienojam komentāru. Šo nesaprast nevarētu pat infuzorija. EDIT: $text = mysql_real_escape_string($_POST[text]); $text = htmlentities($_POST[text]); $text = trim($_POST[text]); Šo laikam tev iemācīja, kad liki to sertifikatu. godīgi sakot man bija viens piemērš tikai ar mysql_real_escape_string vairak neko citu nebiju redzejis protams nācās visu studēt ... zinu ka var apvienot bet patlaban man galvenais mērķis ir satiasit ejošu mājas lapu pēctam tikai uzlabot kodu . Link to comment Share on other sites More sharing options...
spainis Posted October 12, 2010 Report Share Posted October 12, 2010 komentāru pievieno ar ajax Link to comment Share on other sites More sharing options...
Леший Posted October 12, 2010 Report Share Posted October 12, 2010 Faks, nu paskaties vēlreiz tās 3 koda rindas. VĒLREIZ! Link to comment Share on other sites More sharing options...
Faks Posted October 12, 2010 Author Report Share Posted October 12, 2010 (edited) Faks, nu paskaties vēlreiz tās 3 koda rindas. VĒLREIZ! Skaidrs .... Eu Briedi būdu priecīgs dzirdēt kādu labu ideju vel kura tiešam strāda cerams :D Edited October 12, 2010 by Faks Link to comment Share on other sites More sharing options...
Recommended Posts