Demo: LINK
Download: LINK
index.php
<?php require_once("cfg.php"); ?> <html> <head> <title>Kontakt</title> <script type='text/javascript' src='js_kontakt.js'></script> </head> <body> <form action='#'> <input type='button' id='contact_button' value='Show Contact' /><br /> <input type='button' id='contactform_button' value='Show Contact Form' /> </form> <div id='showcontact_form' style='display: none'><font face='Arial' size='2'><br /><b>Formularz kontaktowy:</b><br /><?php include("form.php"); ?></font></div> </body> </html>
form.php
<?php require_once("cfg.php"); $submit = $_POST['submit']; $email = $_POST['email']; $temat = $_POST['temat']; //mail() info $subject = "-- $temat -- PosredniaK - KONTAKT"; $message = "To jest kopia wiadomosc ktora do nas wyslales:\n ---------------------------------------------- Temat: $temat\n Tresc: $text_wiadomosci\n Data: $date\n ----------------------------------------------"; $headers = "From: $adresemail" . "\r\n" . "Reply-To: $adresemail" . "\r\n" . if($text_nums <= 250) { if($submit) { } else { } } } else { } ?> <html> <head> </head> <body> <form action='form.php' method='POST'> <table> <tr> <td><font face="Arial" size="2">Twoj e-mail:</font></td> <td><input type='text' name='email' size='20' /></td> </tr> <tr> <td><font face="Arial" size="2">Temat:</font></td> <td> <select name='temat'> </select> </td> </tr> <tr> <td><font face="Arial" size="2">Tresc:</font></td> <td><textarea name='text'></textarea></td> </tr> <tr> <td></td> <td><input type='submit' name='submit' value='wyslij' /></td> </tr> </table> </form> </body> </html>
cfg.php
<?php $nrgg = 9707426; $adresemail = 'killer99977@wp.pl'; $temat1 = 'Zlecenie'; $temat2 = 'Pomoc'; $temat3 = 'Skarga'; $webname = 'PosredniaK'; ?>