Janhouse Posted November 28, 2005 Report Share Posted November 28, 2005 Kā panākt, ka pec form pievienosanas pazud piemeram $_POST['vards'];, lai spiežot refresh netiek prasits tas retry vai cancel. Kipa lai vienkarsi viss post nodzestos (pazustu). Varbut ka savadak, bet kipa lai spiezot refresh nepostojas ioeraksti Link to comment Share on other sites More sharing options...
Grey_Wolf Posted November 28, 2005 Report Share Posted November 28, 2005 (edited) IMPHO POST vertiibas glabaajas pashaa brauzerii --> taatad var meginaat pie lapas ielaades (kad viss ielaadeejie) ar JS notiiriit visus laukus name.value=''; bet nezinu vai tas paliidzees...... (ljoti iespeejams ka ne) edit: ja straadaa ar sesiijaam var meginaat saglaabaat kaadu mainiigo - ja tiek ierakstiits DB tad mainiigais ir true un pie lapas ielaades paarbaudiit vai vinsh ir true vai false ja true tad $_POST vertiibu paarbaudi izlaizjam.... var vel megjinaat shadi: ierakstam sessijaa kaadu no galvenajiem $_POST parametriem (teiksim teksta lauka pirmos 30-50 simbolus) un saliidzinam vai tie nesakriit ar nolasiitakiem no $_POST ja sakriit - skaidrs ir refreshots... Edited November 28, 2005 by Grey_Wolf Link to comment Share on other sites More sharing options...
blackhalt Posted November 28, 2005 Report Share Posted November 28, 2005 1. posts uz citu.php.failu.php 2. redirekts php.failu.php Link to comment Share on other sites More sharing options...
Grey_Wolf Posted November 28, 2005 Report Share Posted November 28, 2005 (edited) blackhalt-->ja tu domaaji: formas_lapa -->POSTE --> apstrades_lapa -->redirect --> formas_lapa? tad shii sheema nepaliidz :( jo: formas_lapa (satur adresi -/ pati forma/ uz apstrades lapu ) cikls :( edit: respektiivi tas buutu taa pat kaa posteetu 1 reizi .... edit2: ja redirekteetaa lapa tiek aisuutiita brauzerim un tad ar JS redirktee taalaak tad gan tas vareetu paliidzeet..... Edited November 28, 2005 by Grey_Wolf Link to comment Share on other sites More sharing options...
Janhouse Posted November 28, 2005 Author Report Share Posted November 28, 2005 Ka var redirektet isti? Zinu, ka mans panemiens darbojas tikai internet explorer. Uz firefox visi redirekt neiet Link to comment Share on other sites More sharing options...
Vebers Posted November 28, 2005 Report Share Posted November 28, 2005 header("Location: lapa.php?bla=bla"); Link to comment Share on other sites More sharing options...
Garais333 Posted November 28, 2005 Report Share Posted November 28, 2005 (edited) Var mēģināt tā... <?php if (isset($_POST['submit'])) { # var šitā echo "<script type='text/javascript'>window.location='http://superlapa/index.php?f=".time()."'</script>"; # vai āitā header("Location: http://superlapa/index.php?f=".time()); } ?> Itkā strādā Edited November 28, 2005 by Garais333 Link to comment Share on other sites More sharing options...
bubu Posted November 28, 2005 Report Share Posted November 28, 2005 Neticu, ka tavs piemērs, Garais333, strādā. header() fjas izsaukumam jābūt pirms jebkura cita izvada (tā echo, kas vienu rindu augstāk). Link to comment Share on other sites More sharing options...
Grey_Wolf Posted November 28, 2005 Report Share Posted November 28, 2005 (edited) f=".time()); kam shiis? ko dos tas unixtimestamp? bubu--> vinsh bija domaajis 2 varijantus :) Edited November 28, 2005 by Grey_Wolf Link to comment Share on other sites More sharing options...
Garais333 Posted November 28, 2005 Report Share Posted November 28, 2005 to BuBu: Biju domājis vienu no tiem. Vai javascript vai header. to Grey_Wolf: Vajag. Tad viņš linkam galā pieliek vēl kaut ko tipa ...&f=461235 Un tad kad spiež refresh tad pārlādējas jau lapa ar šo URL. Nezinu cik labi sanāca izskaidrot, bet šitais man strādā Link to comment Share on other sites More sharing options...
Grey_Wolf Posted November 28, 2005 Report Share Posted November 28, 2005 (edited) Garais333--> peec tava piemeera lapa refreshosies vienmeer kad tiks padoti formas dati --> tos nemaz nepaarbaudot... kaada tad jeega no formas? (ja nu vieniigi to uzliek Pec datu ievades ieksh DB) un ja Vajag izvadiit pazinjojumu par kljuudu utt? Edited November 28, 2005 by Grey_Wolf Link to comment Share on other sites More sharing options...
Garais333 Posted November 28, 2005 Report Share Posted November 28, 2005 (edited) pārbaudes jau var sarakstīt iekš if (isset($_POST['submit'])) { saliec visas pārbaudes un visu pārējo ko vajag ar datiem darīt un tad if (viss kārtībā ar datiem) { echo"<script language............"; } else { izvadam kļūdas paziņojumus; } } Edited November 28, 2005 by Garais333 Link to comment Share on other sites More sharing options...
Vebers Posted November 28, 2005 Report Share Posted November 28, 2005 varbuut var taa kad visi dati savadiiti DB un parbaudiiti, tad unset($_POST) ? Link to comment Share on other sites More sharing options...
bubu Posted November 28, 2005 Report Share Posted November 28, 2005 MakaTaNaw: galīgi un greizi. Tev nav izpratnes par POST datu nosūtīšanas darbības principu un to apstrādi php, ja jau šādu ieteikumu saki.. Link to comment Share on other sites More sharing options...
Vebers Posted November 28, 2005 Report Share Posted November 28, 2005 jaaiet ciemos uz php.net izgliitoties :) Link to comment Share on other sites More sharing options...
Recommended Posts