qualcuno può dirmi dove sbaglio??
- PAGINA "modulo.html"
| <form action="invio.php" method="post" id="modulo"> <table> <tr> <td>Email address*</td> <td><label> <input name="mail" type="text" id="mail" /> </label></td> </tr> <tr> <td>Name*</td> <td><label> <input name="object" type="text" id="object" /> </label></td> </tr> <tr> <td>Message*</td> <td> <textarea name="body" cols="30" rows="5" id="body"></textarea> </td> </tr> <tr> <td><label></label> </td> <td><label> <input type="submit" name="submit" id="submit" value="Send" /> <input type="reset" name="cancella" id="cancella" value="Delete" /> </label></td> </tr> </table> </form> |
|---|
- PAGINA "invio.php**"**
| <?php if ((trim($_POST['object']) != "") && (trim($_POST['body']) != "")) { // $to = "[email protected]"; $headers = "From: " . $_POST['mail'] . "\n"; $subject = "Modulo proveniente da miosito"; $body = "Contenuto del modulo:\n\n"; $body .= "Inviata da: " . trim(stripslashes($_POST["mail"])) . "\n"; $body .= "Name: " . trim(stripslashes($_POST["name"])) . "\n"; $body .= "testo: " . trim(stripslashes($_POST["body"])) . "\n"; mail($to, $subject, $body, $headers); echo "Your message was sent successfully"; } else { echo "His message was not sent"; } |
|---|
Invio le pagina sul mio ftp, quando vado ad aprire la pagina modulo inserisco nome, e-mail e testo ma poi se clicco su invia rimane tutto bloccato.
P.S. in rosso trovate quello che ho modificato dallo script originale