Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Need help with a monthly email update form.

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #25904

    Hey all,

    Not sure if this is the right section to post this in but if it isn’t, please direct me to the proper place.

    On my site (wordpress based), I want my visitors to be able to sign up for a monthly e-mail update. right now I have a little form with a graphical button on the upper right hand corner using this code:

    <form action="#" id="updates">
    <label for="email">Get email updates</label>
    <input type="text" name="email" class="email_field" />
    <input type="submit" name="submit" class="submit_button" value="" />
    </form>

    Obvisouly, it doesn’t do anything at this time. I thought of using a service but its really only for family and close friends so the amount of e-mails being sent out are minimal. I already created the html file for my email and I’ll be using thunderbird to send them out (just like Chris showed in one of his screencasts.) So, I guess what I need this to do is send an e-mail to me saying: "this email address [email protected] would like a monthly email update." Can I use the WP plug-in of contact form 7 to make this work?

    Thanks guys!

    #62922
    Chris Coyier
    Keymaster

    You should point that action URL (and add method="post") to a PHP file with something like this in it:

    <?php

    $Email = Trim(stripslashes($_POST));

    $Body = "This email should be added to the list: $Email";

    $success = mail("[email protected]", "New Subscribe", $Body, "From: [email protected]");

    ?>

    #62926
    "chriscoyier" wrote:
    You should point that action URL (and add method="post") to a PHP file with something like this in it:

    <?php

    $Email = Trim(stripslashes($_POST));

    $Body = "This email should be added to the list: $Email";

    $success = mail("[email protected]", "New Subscribe", $Body, "From: [email protected]");

    ?>

    Cool, thank you Chris!!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Back End’ is closed to new topics and replies.