![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 41 Pomógł: 0 Dołączył: 30.12.2008 Ostrzeżenie: (0%) ![]() ![]() |
Witam,
Mam prosty formularz internetowy i bym chciał go zabezpieczyć przed ponownym wysłaniu po odświeżeniu strony. I bym chciał jeszcze dać, że trzeba wypełnić wszystkie dane przed wysłaniem. Prosiłbym o pomoc lub ewentualne linki |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 41 Pomógł: 0 Dołączył: 30.12.2008 Ostrzeżenie: (0%) ![]() ![]() |
ja mam formularz internetowy, co wysyła wiadomość na e-mail z przeglądarki, kod tego formularza to:
<?php if (count($_POST)) { ////////// USTAWIENIA ////////// $email = 'mail'; // Adres e-mail adresata $subject = 'test'; // Temat listu $message = 'Wysłano'; // Komunikat $error = 'Wystąpił błąd podczas wysyłania formularza'; // Komunikat błędu $charset = 'iso-8859-2'; // Strona kodowa ////////////////////////////// $head = "MIME-Version: 1.0\r\n" . "Content-Type: text/plain; charset=$charset\r\n" . "Content-Transfer-Encoding: 8bit"; $body = ''; foreach ($_POST as $name => $value) { if (is_array($value)) { for ($i = 0; $i < count($value); $i++) { $body .= "$name=" . (get_magic_quotes_gpc() ? stripslashes($value[$i]) : $value[$i]) . "\r\n"; } } else $body .= "$name=" . (get_magic_quotes_gpc() ? stripslashes($value) : $value) . "\r\n"; } echo mail($email, "=?$charset?B?" . base64_encode($subject) . "?=", $body, $head) ? $message : $error; } else { ?> <form action="?" method="post"> Treść formularza <input type="submit" value="Odbieram" /> <input type="reset" value="Resetuj" /> </form> <?php } ?> I to chce zabezpieczyć, że jeżeli już ktoś wyśle i dostanie komunikat "Wysłano" i kliknie odswiez, zeby ta wiadomość nie była do mnie ponownie wysłana |
|
|
![]() ![]() |
![]() |
Aktualny czas: 3.10.2025 - 06:06 |