Grow your CSS skills. Land your dream job.

Need help with a monthly email update form.

  • # August 27, 2009 at 6:07 pm

    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 name@email.com would like a monthly email update." Can I use the WP plug-in of contact form 7 to make this work?

    Thanks guys!

    # August 27, 2009 at 11:24 pm

    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("youremail@email.com", "New Subscribe", $Body, "From: youremail@email.com");

    ?>

    # August 28, 2009 at 12:40 am
    "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("youremail@email.com", "New Subscribe", $Body, "From: youremail@email.com");

    ?>

    Cool, thank you Chris!!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".