Search the Community
Showing results for tags 'form'.
-
Hey guys! So far my website is looking great! Just trying to get this contact form to function. Wondering if everything lines up: HTML code: <!--contact-form-------------------> <section id="contact-form"> <form> <!--left---------------------------------------> <div class="contact-left"> <h1 class="c-l-heading"><font style="border-bottom: 3px solid #1ED98B;">Writ</font>e Me</h1> <!--name--------> <div class="f-name"> <font >Name</font> <input type="text" placeholder="Full Name"/> </div> <!--email--------> <div class="f-email"> <font >Email</font> <input type="email" placeholder="Example@gmail.com"/> </div> </div> <!--right-------------------------------------------> <div class="contact-right"> <!--message--------> <div class="message"> <font >Message</font> <textarea name="message" rows="5" cols="20" placeholder="Write Message..."></textarea> </div> <!--submit-btn------------> <button>submit</button> </div> </form> </section> php: ?php $name = $_POST['name']; /*this will display the name of the users */ $visitor_email = $_Post['email']; /*this will display the email of the user */ $message = $_POST['message']; /*this will store the message */ $email_from = 'Ryan-vand@outlook.com' /*I will receive this via this line of code */ $email_subject = "new form submission"; $email_body = "User Name: $name.\n"."User Email: $visitor_email.\n"."User Message: $message.\n"; $to = "Ryan-vand@outlook.com"; $headers = "From: $email_from\r\n"; mail($to,$email_subject,$email_body,$headers); header("Location: firstdraft.html"); ?>
-
Hello. I manage a not-for-profit website that has several HTML forms that generate emails to me with information such as name, address etc. The forms have worked great for many years with very few problems. However, in the last couple of months there have been several intermittent instances where a website visitor completed the form, clicked Submit, but I never received the email. So, either the email was not generated, or something prevented me from receiving the email. My spam settings do not block the emails. If I try the form myself as a test, the form always works fine and I receive the email. I am wondering if there is a problem with some devices such as specific phones types that are unable to generate the emails when a form is completed. Would anyone have a suggestion as to where to look for the source of these intermittent problems and how to avoid them? Thank you in advance for any help that you can offer. Paul