Skip to content Skip to sidebar Skip to footer

Subscription Form Not Working (PHP)

I'm trying to allow people who visit my website to subscribe by filling out a short form and having the website send me an email with the information, but at the moment the form wo

Solution 1:

Problem #1

You're looking for POST variables but are sending them via GET since you never explicitly set it to POST. To solve this change:

<form id="ContactForm" action="mail/MailHandler.php">

to:

<form id="ContactForm" action="mail/MailHandler.php" method="POST">

Problem #2

You forgot to give your inputs names:

<input type="text" value="Name:" class="input">

should be:

<input type="text" value="Name:" name="name" class="input">

Problem #3

You lack a submit button:

<input type="submit" value="submit">

That should replace:

<a href="mail/MailHandler.php" class="button1" data-type="submit">
    <span><strong>submit</strong></span>
    <span class="active"><strong>submit</strong></span>
  </a>

Post a Comment for "Subscription Form Not Working (PHP)"