How to create html subscribe/newsletter form

Discussion in 'HTML & Website Design' started by Sukhen Tanch, Oct 4, 2014.

  1. #1
    Hello guys,
    Please tell me how to create a html subscribe/newsletter form manually. I want to put it in my WordPress blog widgets.
    Look like this type of form:
    [​IMG]

    Note: I can create button, logo and etc. I'm professional graphics designer.

    Thanks and waiting :)
     
    Sukhen Tanch, Oct 4, 2014 IP
  2. themes4all

    themes4all Well-Known Member

    Messages:
    662
    Likes Received:
    47
    Best Answers:
    6
    Trophy Points:
    100
    #2
    Here is a simple Code using PHP, you will have to make the buttons...this one is kinda Simple :

    HTML code

    
    <form method="POST" action="enter the URL to your PHP page here">
    <p>Name: <input type="text" name="Name" size="20"></p>
    <p>Email: <input type="text" name="Email" size="20"></p>
    <p><input type="submit" value="Submit" name="Submit"></p>
    </form>
    
    Code (markup):
    The PHP Code :

    
    <?php
    
    ## CONFIG ##
    
    # LIST EMAIL ADDRESS
    $recipient = "enter the lists email address here";
    
    # SUBJECT (Subscribe/Remove)
    $subject = "Subscribe";
    
    # RESULT PAGE
    $location = "enter the URL of the result page here";
    
    ## FORM VALUES ##
    
    # SENDER - WE ALSO USE THE RECIPIENT AS SENDER
    # DON'T INCLUDE UNFILTERED USER INPUT IN THE MAIL HEADER!
    # SEE ALSO: How to protect a php Email Form using php mail or mb_send_mail against Mail Header Injection
    $sender = $recipient;
    
    # MAIL BODY
    $body .= "Name: ".$_REQUEST['Name']." \n";
    $body .= "Email: ".$_REQUEST['Email']." \n";
    # add more fields here if required
    
    ## SEND MESSGAE ##
    
    mail( $recipient, $subject, $body, "From: $sender" ) or die ("Mail could not be sent.");
    
    ## SHOW RESULT PAGE ##
    
    header( "Location: $location" );
    ?>
    
    Code (markup):
    Goodluck
     
    themes4all, Oct 6, 2014 IP
  3. ketting00

    ketting00 Well-Known Member

    Messages:
    782
    Likes Received:
    28
    Best Answers:
    3
    Trophy Points:
    128
    #3
    The easier way is using wordpress plug-in. Search for the plug-in of your choice on the web.
     
    ketting00, Oct 7, 2014 IP