<form action="./send_msg.php" method="post" enctype="text/plain" onSubmit="return on_submit(this);"> <table style="vertical-align:middle; border: solid 0.1mm #000000; font-size:12px; width:90%;"> <tr> </tr> <tr> </tr> <tr> </tr> <tr> </tr> <tr> </tr> <tr> </tr> <tr> </tr> <tr> <td> <textarea style="font-size:12px; font-family:Geneva, Arial, Helvetica, sans-serif;" name="message" cols="27" rows="5"></textarea> </td> </tr> <tr style="text-align:center;"> <td style="border-top: solid 0.1mm #000000; padding-top:10px;"> <input name="button_submit" type="submit" value="Wyślij" /> <input name="button_reset" type="reset" value="Wyczyść" /> </td> <td style="border-top: solid 0.1mm #000000; text-align:left;" > </td> </tr> </table> </form>
Funkcja 'on_submit()' sprawdza podane dane.
W pliku 'send_msg.php' prubuje pobrać dane:
<?php $namesurname = $_POST["name_surname"]; $companyname = $_POST["company_name"]; $address = $_POST["address"]; $state = $_POST["state"]; $phone = $_POST["phone"]; $fax = $_POST["fax"]; $email = $_POST["email"]; $message = $_POST["message"]; ?>
isset zwraca false dla każdej zmiennej.
Gdy plik zawierający 'form' miał rozszerzenie html i nie zawierał wstawek php wszystko działało.
Gdzie błąd?
Pozdrawiam