Jump to content

Email Address Processing for Subscription Forms


Recommended Posts

Hi, it's been awhile since I've posted here. Maybe that's a good thing in that I guess I'm doing things right? :-)

Anyway, something that I find confusing is the "process input" when it comes to forms. An example would be a subscription form. Many, many designs out there on the web but few of their authors explain simply how to get the form to work. And by work I mean how to direct the form info to a particular email. In this case it would obviously be an email of mine where I could receive the subscriber's email address.

Here is the html code section for a subscription form:

  <section class="subscribe">
    <div class="subscribe-pitch">
      <p>Subscribe to our newsletter to get the latest scoop right to your inbox.<p>
    <form action="index.html" method="post" class="subscribe-form">
      <input type="email" name="email" class="subscribe-input" placeholder="Email address" autofocus>
      <button type="submit" class="subscribe-submit">Subscribe</button>


It looks really good, I've customized it, etc. Now all I need to know is where to place the email where the info is sent. I think it might be a separate PHP page on the server but not sure. I hope someone here has a simple solution.

For those wanting more specifics, here is the page from where I got the code. You'll notice in the comments section others asking this same question yet the author doesn't answer.

Thank You for any help.



Link to comment
Share on other sites

'dsonesuk', thank you for responding. :-)

In the W3 link the first example seems easy enough. So do I make a .php file (with any name on it I guess?) and then upload that along with the form files?

What would have to be modified in that example file to refer to the form, and/or the other way around?


Link to comment
Share on other sites

You probably should read through the PHP tutorial, there's a full section of the tutorial dedicated to form handling:

  1. Form Handling
  2. Form Validation
  3. Form Required
  4. Form URL/E-mail
  5. Form Complete

This is just the basics of building a server application. If you intend to make a mailing list, you'll need a database to store e-mail addresses and probably an admin panel to create the e-mail templates to be sent to the subscribed users. What you're trying to do is not a simple task that can be solved by just copying and pasting code.

Link to comment
Share on other sites

What I'm trying to do IS a simple task: just have the form send me a simple email with the email address the subscriber put in. I've said nothing about email lists, creating templates and whatnot. And if there were no simple tasks that could be solved by copy and paste then why would W3Schools have loads of "try it yourself" copy and paste solutions just like the link 'dsonesuk' suggested? Read 5 tutorials? I already have the form page ready to go, all I need is a how-to for configuring the file already provided by the suggested link.




Link to comment
Share on other sites

The trouble is, these simple email options are open to abuse from hackers and spam bots, if you think that won't be a problem you'd be wrong! you WILL receive 100s of spam emails.

Without proper validation and sterilization, with addition of some sort of reCAPTCHA forcing user to identify that they are human, by selecting a image or type specific text before submitting takes place.


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...