Email Subscription Form | Sanwebcorner

Email Subscription Form

This is one of the important concept The Email Subscription or Newsletter SignUp, This concept is used get the user Name and Email for to Provide our Latest Updates to the clients.

This is several ways to get Email Id from customer first one is to get email and name from user and store it to the text documents (like Notepad)

The second option is to get the Email id from customer and store it to the database table.

The Third one is to  store the Email id and customer name to the Our Email.

In this post i am explain about the First way , That is to store the email and name to the Notepad or Text Documents.

Remaining I will post after a few days....



<title>Simple Email Subscription Form | san web corner</title>
<META NAME='Keywords' lang='en-us' CONTENT='newsletter Signup, mailing list, subscriber, JQuery, PHP, mySQL, sign-up form'>
  <META NAME='description' CONTENT='A newsletter opt-in form using JQuery, PHP, mySQL.'>
  <meta http-equiv="content-type" content="text/html; charset=utf-8">
  <script src="//"></script>
var thankyou = "Thank you";
function signup(thisform) {
    $("#submit, #myResponse")
    params = $("#subform")
    $.post("sub.php", params,
      function(response) {

            display: 'inline',
            color: 'green'
    return false;
td {
  padding: 5px;

  <form onsubmit="return signup(this);return false;" method="post" name="subform" id="subform" action="sub.php">
    <table width="400" border="1" style="border-collapse:collapse;" align="center" ;>
          <label style="display: inline-block;width:135px">Email:</label>
          <input type="email" required id="email" name="email" value="">
          <label style="display: inline-block;width:135px">Name:</label>
          <input type="text" required name="name" id="name" value="">
          <input type="submit" id="submit" name="submit" value="Sign up">
        <div style="width:100%"><span id="Error" style="color:red;display:none;"></span>
        <div id="myResponse" style="DISPLAY:none; text-align:center; width:100%; margin-left:auto; margin-right:auto;"></div>


$email = trim(htmlspecialchars($_REQUEST["email"]));
$name = trim(htmlspecialchars($_REQUEST["name"]));
$pfileName = "mails.txt";
$MyFile = fopen($pfileName, "a");
$nline="\"Email : ".$email."\"" ."----" ."\"Name : ".$name."\"" ."\r\n";
fwrite($MyFile, $nline);

In This I am using html and javascript and php to display error message and display the thanks message and validation.

You have to create one Notepad document name it as a mails 

Your Result Like below :


Post a comment


360 degree view product image 3d rotate 3d text 3step-form Accordion menu ajax All Browsers Animated Background Gradient animation audio controller auto complete Best accordion menu bootstrap Bootstrap form validation border bounce effect on hover Breadcrumb calculate age by dob calendar Captcha change image on mouse move color chooser countdown Counter on scroll create random number Css css animation css buttons css hover css3 customized upload Button Date picker delete data from table Different scroll speed donation form download zip email otp verification email verifier Embed eventlist Expanding Menu feedbck form flash news section close button full screen menu Google custom search Google Maps Google reCAPTCHA Google site search gradient heart animation hide menu Horizontal News ticker Hover Htm Html html dropdown html form html form validation html5 html5 form validation Iframe image hover increment decrement textbox value based on select box Javascript javascript validation Jquery jquery validation js Layered image effect on mouse hover lock & unlock page scroll marquee marquee with close button mobile number validation mobile otp login Multi-level-drop-down-menu multi-level-form multi-select-checkbox Multi-Step-form Multiple File Upload in PHP mysql News ticker on hover change text to image our team page password generator password strength checker paypal form paypal html form Photoshop PHP php mailer populate html selectbox Popup image on click the link pure css Question type form random number generate Random password Redirect page Based on the select box while submit the form responsive responsive menu responsive popup box Responsive Vertical Time line design rotate image selectbox based on select box simple coming soon page simple countdown based on end date simple typing effect slider sliding tab sms otp login statistic counter on scroll switch tag shape team member Time picker toggle toggle view transparent button underline animation up down slide validation vertical fixed sidebar Webtips whatsapp link website Whislist Youtube