contact form con tiny mce : problema textarea
-
Salve a tutti, ho sviluppato un semplice modulo email con antispam e textarea editabile con tinymce, il modulo è visibile qui :
robertopaolucci.it/form-email/tinymce/examples/index.php
compilo tutto il modulo ma quando invio mi appare un messaggio nella textarea che mi dice che non è stato inserito nessun contenuto. Dove può stare il problema?
Il form html (senza il codice per tinymce ) è :<form id="contact" name="contact" method="post" action="index.php" enctype="multipart/form-data"> <input type="hidden" name="check" value="01"> <small>*all form fields are required.</small> <label for="name" id="namelabel">Name:<span class="err topp">enter your name</span></label> <input type="text" name="name" id="name" class="textinput"> <label for="email" id="emailabel">E-mail:<span class="err topp">enter a valid e-mail address</span></label> <input type="email" name="email" id="email" class="textinput"> <label for="message" id="msglabel">Message:<span class="err txarea">share some stuff with us</span></label> <textarea name="message" id="message" class="msgtextarea"></textarea> <img src="captcha.php" id="captchaimg"> <label for="captcha" id="captchalabel">You're not a spammer, right?<span class="err capter">your CAPTCHA code looks wrong</span></label> <input type="text" name="captchavalue" id="captchavalue" class="textcaptcha"> <section id="subber"> <a href="javascript:void(0);" name="submitlink" id="submitlink" class="btn">Send Message</a> </section> </form>Il codice per la pagina di elaborazione è :
<?php$sender = $_POST['name'];$return = $_POST['email'];$message = nl2br($_POST['message']); $to = "[email protected]";$subject = "Messaggio da sito web"; $headers = "From: " . strip_tags($return) . "\r\n";$headers .= "Reply-To: ". strip_tags($return) . "\r\n";$headers .= "MIME-Version: 1.0\r\n";$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; $msg = "<html><body>";$msg .= "<h2 style='font-weight:bold;border-bottom:1px solid #bbb;'>New Contact Message</h2>\r\n";$msg .= "Sent by: <strong>".$sender."</strong><br />\r\n";$msg .= "Respond to: <strong>".$return."</strong><br /><br />\r\n";$msg .= "Message: <br />\r\n";$msg .= "<em>".$message."</em><br />\r\n";$msg .= "</body></html>"; if(@mail($to, $subject, $msg, $headers)) { echo "yes";} else { echo "no";} ?>Vi ringrazio in anticipo,
Buona giornata,
Roberto
Ciao! Sembra che tu sia interessato a questa conversazione, ma non hai ancora un account.
Stanco di dover scorrere gli stessi post a ogni visita? Quando registri un account, tornerai sempre esattamente dove eri rimasto e potrai scegliere di essere avvisato delle nuove risposte (tramite email o notifica push). Potrai anche salvare segnalibri e votare i post per mostrare il tuo apprezzamento agli altri membri della comunità.
Con il tuo contributo, questo post potrebbe essere ancora migliore 💗
Registrati Accedi