![]() |
![]() |
![]()
Post
#1
|
|
![]() Grupa: Zarejestrowani Postów: 47 Pomógł: 0 Dołączył: 7.02.2008 Ostrzeżenie: (0%) ![]() ![]() |
Witam.
Mam wydaje mi sie dosyc banalny problem z formularzem, nie chce sie wyslac na maila. Wydaje mi sie ze cos przeoczylem. Prosze o pomoc Kod <?
$wysylajacy = $_POST['wysylajacy']; $odbiorca = "tresc <kontakt@tresc.eu>" . ", "; $trescmaila = $_POST['trescmaila']; mail($odbiorca, $trescmaila, $wysylajacy); if(!isset($_GET['site'])) { echo'<div class="skontakt">Tresc...</div> <form action="mailto:kontakt@tresc.eu" method="post" name="mail"> <textarea name="trescmaila" cols="110" rows="6" class="logowanie1">'.$_POST['trescmaila'].'</textarea> <div class="logowanie4">Adres e-mail:</div> <div class="logowanie3"><input name="wysylajacy" type="text" size="113" class="logowanie" value="'.$_POST['wysylajacy'].'" /></div> </form> <input name="submit" type="submit" value="Wyślij" class="logowanie2"/>'; } ?> |
|
|
![]() |
![]()
Post
#2
|
|
![]() Grupa: Zarejestrowani Postów: 382 Pomógł: 22 Dołączył: 21.05.2007 Skąd: Elbląg Ostrzeżenie: (0%) ![]() ![]() |
Kod if (empty($_POST['submit'])) {
// wyświetlamy formularz echo " <table border=\"0\"><form method=\"post\"> <tr> <td>Treść wiadomości</td> <td><textarea name=\"tresc\" style=\"width: 250px; height: 100px\"></textarea></td> </tr> <tr> <td>Imię, nazwisko lub nick</td> <td><input type=\"text\" name=\"imie\" style=\"width: 250px\"></td> </tr> <tr> <td>Adres e-mail</td> <td><input type=\"text\" name=\"email\" style=\"width: 250px\"></td> </tr> <tr> <td> </td> <td><input type=\"submit\" name=\"submit\" value=\"Wyślij\"> <input type=\"reset\" value=\"Od nowa\"></td></form> </tr> </table>"; } elseif (!empty($_POST['tresc']) && !empty($_POST['imie']) && !empty($_POST['email'])) { $trescmaila = $_POST['trescmaila']; $header = "From: $_POST['wysylajacy'] <$_POST['wysylajacy']>"; @mail("twoj@email.pl","Tytul wiadomosci","$trescmaila","$header") or die('Nie udało się wysłać wiadomości'); // wyświetlenie komunikatu w przypadku powodzenia echo "<div align=\"center\"><strong>Wiadomość została wysłana poprawnie!</strong></div>"; } else echo "<span style=\"color: #FF0000; text-align: center;\">Wypełnij wszystkie pola formularza!</span>"; Ten post edytował MajareQ 13.10.2008, 16:53:51 |
|
|
![]() ![]() |
![]() |
Aktualny czas: 22.08.2025 - 00:30 |