Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title></title>
- </head>
- <body>
- <h5>Pola wymagane zaznaczone są <a>*</a></h5>
- <form method="POST" name="myForm" id="myForm" action="#">
- <fieldset>
- <legend>mejl</legend>
- //
- <label for="adres">tytul <a>*</a></label>
- <input type="text" id="tytul" title="Wpisz tytul" name="tytul" required="required" />
- <br />
- <label for="tresc" >tresc <a>*</a></label>
- <input type="text" id="tresc" name="tresc" required="required" />
- <br />
- </fieldset>
- <br />
- <input id="Button1" type="submit" name="Button1" value="Wyślij" />
- <input id="Reset1" type="reset" value="reset" />
- <br />
- </form>
- <?php
- //mail($adres, $tytul, $wiadomosc);
- //$od = "From: katarzyna.rzonca@hotmail.com \r\n";
- //$od .= 'MIME-Version: 1.0'."\r\n";
- //$od .= 'Content-type: text/html; charset=iso-8859-2'."\r\n";
- $headers = 'From: katarzyna.rzonca@hotmail.com ' ."\r\n".
- 'Reply-To: katarzyna.rzonca@hotmail.com ' . "\r\n".
- 'Content-type: text/html; charset=utf-8' ."\r\n";
- if ( isset( $_POST['Button1']) )
- {
- $adres = 'tutajmejl@gdzie.ma.wysylac chyba';
- $tytul = $_POST['tytul'];
- $wiadomosc = $_POST['tresc'];
- if(empty($adres) || empty($tytul)|| empty($wiadomosc))
- {
- echo "proszę wypełnic pola";
- }
- else
- {
- mail($adres, $tytul, $wiadomosc,$od);
- $ins = mail($adres, $tytul, $wiadomosc,$od);
- if($ins) echo "wyslano";
- else echo "nie wyslano";
- }
- }
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement