Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //w kontakt.html mam to:
- <div id="formularz">
- <form method="post" action="kontakt.php">
- <label>Imię/pseudonim</label>
- <input name="name" placeholder="np. Dominik">
- <label>Email</label>
- <input name="email" type="email" placeholder="np. jkowalski@gmail.com">
- <label>Wiadomość</label>
- <textarea name="message" placeholder="Napisz tu wiadomość"></textarea>
- <input id="submit" name="submit" type="submit" value="Wyślij">
- </form>
- </div>
- // a w kontakt.php to:
- <?php
- $name = $_POST['name'];
- $email = $_POST['email'];
- $message = $_POST['message'];
- $odkogo = "poweradi@onet.eu";
- $dokogo = "adi_96@onet.eu";
- $tytul = "Formularz kontaktowy z Nie daj się nudzie w Szczecinie";
- $wiadomosc = "";
- $wiadomosc .= "Imię/pseudonim: " . $name . "\n";
- $wiadomosc .= "Email: " . $email . "\n";
- $wiadomosc .= "Wiadomość: " . $message . "\n";
- $naglowek = "";
- $naglowek .= "Od:" . $odkogo . " \n";
- $naglowek .= "Content-Type:text/plain;charset=utf-8";
- $sukces = mail($dokogo, $tytul, $wiadomosc, $naglowek);
- if ($sukces){
- print "<meta http-equiv="\" refresh\""="" content="\" 0;url="potwierdzenie.html\""">";
- }
- else{
- print "<meta http-equiv="\" refresh\""="" content="\" 0;url="error.html\""">";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement