Deb Posted July 9, 2018 Share Posted July 9, 2018 Hello! What is needed to make this form work? The answer may be obvious to most, but I have limited knowledge of html, css, and trying to understand php through the tutorials. I have tried searching similar questions but haven't been able to apply answers to my form. I have modified the form taken from the Parallax template and created a php page, but when I hit the SEND MESSAGE it goes to a 404 error page. I have the website up on a test site, http://debschneiderdesign.com/NextChapter/home.html#home Thanks, Deb <form action="/NextChapter/form-to-email.php" method="post" target="blank" > <div class="w3-row-padding" style="margin:0 -16px 8px -16px"> <div class="w3-half"> <input class="w3-input w3-border" type="text" placeholder="Name" required name="Name"> </div> <div class="w3-half"> <input class="w3-input w3-border" type="text" placeholder="Email" required name="Email"> </div> </div> <input class="w3-input w3-border" type="text" placeholder="Message" required name="Message"> <button class="w3-button w3-dark-grey w3-right w3-section" type="submit"> <i class="fa fa-paper-plane"></i> SEND MESSAGE</a> </button> </form> Link to comment Share on other sites More sharing options...
davej Posted July 9, 2018 Share Posted July 9, 2018 The file "form-to-email.php" does not exist. Link to comment Share on other sites More sharing options...
Deb Posted July 9, 2018 Author Share Posted July 9, 2018 Thank you for your quick response davej. I thought I was linking it to a page I named action_page.php. Now I have uploaded "form-to-email.php" and I get the following message, "error; you need to submit the form!Name and email are mandatory!" Link to comment Share on other sites More sharing options...
dsonesuk Posted July 9, 2018 Share Posted July 9, 2018 (edited) Its looking for post index names of 'name', 'email', 'message' and 'submit' in comparison to what you have used 'Name', 'Email', 'Message' and no attribute name or value for 'submit', which because in php are case sensitive and therefore treated as completely different, and in one case does not exist at all to pass validation in the php page it is sent to. Edited July 9, 2018 by dsonesuk Link to comment Share on other sites More sharing options...
Deb Posted July 9, 2018 Author Share Posted July 9, 2018 Thank you dsonsuk, I see what you are saying about 'name', 'email' and 'message'. I made those changes and added value="Submit" to my home page (hope that is what you meant), but even after looking through the php tutorials I can't figure out what else is needed. Link to comment Share on other sites More sharing options...
dsonesuk Posted July 9, 2018 Share Posted July 9, 2018 When i made the changes with ALL lowercase including 'submit', it passed and tried to go to thank you page but got a 404 error, so that needs to be corrected too. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now