Jump to content

What is needed to make this form work?


Deb

Recommended Posts

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

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

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 by dsonesuk
Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...