I tried with the header ('location: login.php'); But do not work, it is not even used to redirect the page, any thoughts? Also tried with javasvript to remove the input but do not stop the rebuilt. No header when placed in header ('location: login.php'); Do not work.
if isset ($ _ POST ['vrsta_predmeta']) and! Empty ($ _ POST ['vrsta_predmeta']) and isset ($ _ POST ['res_text']) and isset ($ _POST ['glavni_dug']) and isset ($ _ POST ['res']) and isset ($ _ POST ['zaklj']) and isset ($ _ POST ['povjerilac']) and isset ($ _ POST ['duznik']) and continue ($ _ POST ['predmet_zaveden'])) {$ racunob = trim ($ _ POST ['rac']); $ Obrazlozenje = trim ($ _ POST ['obr']); $ Ob_text = trim ($ _ POST ['res_ob']); $ Res_text = trim ($ _ POST ['res_text']); $ Vrsta_pre = trim ($ _ POST ['vrsta_predmeta']); $ Izvrsenje = trim (strtolower ($ _ POST ['res'])); $ Obrazac = trim ($ _ POST ['zaklj']); $ Povjerilac = $ _POST ['Povjerilak']; $ Duzniki = $ _POST ['duznik']; $ Datum = trim ($ _ POST ['predmet_zaveden']); Forex Currency ($ povjerilac $ as Key) {$ lica = $ db - & gt; ("$ Key", '$ dok_broj', '$ ses_val')) "Prepare (" POSrilak, Doc_RR, DOCU_ORGICAL) INSERT;} Foreign Exchange ($ Key $ as $) {$ lica1 = $ db - & ("$ Key1 ',' $ dok_broj ',' $ ses_val '))" Prepare ("Enter" in DULICA (DUJNIC, DOCK_BR, DOCUE_Scientist); $ $ Insert_dok = $ db - & gt; Prices (' $ ses_val ',' $ Dok_broj ',' $ vrsta_pre ',' $ obrazac ',' '$' ',' '$' ',' $ izvrsenje ',' $ assumed ',' $ res_text ',' $ obrazlozenje ',' Execute ($ lica - & gt;) and $ insert_dok - & gt; execute () and execute $ lica1 - & gt; ($) - $ ($ ob_text ',' $ racunob ');) {$ lica - & Gt; B ($); $ Lica1 - & gt; Close (); $ Insert_dok - & gt; Close (); echo '' script> New Messi (\ 'document uspjesno dodat. \', {Title: \ 'Obavjestenje \', titleClass: \ 'success \', button: [{id: 0, label: \ 'close \', val: \ 'x \'}]}); ; '; Header (' location: login.php ');} Other {echo'} script> New Messi (\ 'document uspjesno dodat. \ ', {Title: \' Obavjestenje \ ', titleClass: \' Anime Warning \ ', button: [{id: 0, label:' close ', val: \' x \ '}]}); & Lt; / Script & gt; '; }}
You can not redirect content after output. Since you output JavaScript, you must change your redirects via javascript.
echo & lt; Script & gt; New Messi (\ 'document uspjesno dodat. \', {Title: \ 'Obavjestenje \', titleClass: \ 'success \', button: [{id: 0, label: \ 'close \', val: \ 'x \ '}]}); & Lt; / Script & gt; '; Header ('location: login.php'); // ^^^ This will not work // redirect instead of trying it again after five seconds of loading the page. Echo 'window.setTimeout (function () {window.location = "login.php"}, 5000);';
As far as the problem of resubmitting the form, you have to implement it. Basically, you have to do a redirect with 303 HTTP header to stop the browser from resubmitting the page. After the form is processed, you will use something to redirect to:
Header ('location: /login.php', true, 303); Go out;
Comments
Post a Comment