C
CPAInfinitySteve
Guest
This is a thread dedicated to the newcomers to CPA as well as the more seasoned marketers that have wondered "How do I create my own email submits?" As well as for the people that always complain saying that email submits shave massively. This will help you gauge your OWN traffic and see why the email submit companies do shave how they do. Now mind you - everyone's result will be different, but I will give you all of the required code necessary.
Tools I personally recommend getting, you can use whatever you feel most comfortable with.
Notepad++
Description - A general code editor. I use it primairly for Javascript, PHP, and HTML
Download - Notepad++ v6.2 - Current Version
FileZilla
Description - A FTP Client used for managing a webserver.
Download - FileZilla - Client Download
Recommended knowledge -
Language - HTML
Why - To edit the web pages style / appearance.
Tutorials - HTML Tutorial
Language - PHP
Why - To be able to store the information you collect, 99% of the tutorials out there use MySQL, you don't need to use MySQL but it's recommended. But in this tutorial I will be showing you how to store the information without MySQL
Tutorials - PHP Tutorial
Language - CSS
Why - To be able to create StyleSheets for your landing page to give it that little extra oomph style wise.
Tutorials - CSS Tutorial
Language - Javascript
Why - To be able to create the validation. Meaning if the person filling out the offer doesn't input their first name, it will tell them that they must fill out their first name in order to continue. This will not be used in this tutorial, as there is countless ways to use validation. You will have to find your own / create your own.
Tutorials - JavaScript Tutorial
Step: One
Module: Creating the landing page appearance / base.
This will give you a "clean template" to design the landing page.
First off, the standard HTML code brackets.
Now time to create the form for the capture of the information.
the code
is the code that is used to put the information in, it tells the information where to "POST"(send) to.
the code
is the textbox where the user will put their email in.
From there, the "infocapture.php" is the page that will store the information and display the rest of the information ex; the second page.
The following part of the code will be the second part of your form, ex; the second page submit.
The following will be your co-reg path page where you will place your co-reg offers.
Here are the three files completed.
Your index file - where you will collect the users email -
Name: Index.html
Your second page submit.
The users' information will be stored in your CSV file.
Make a directory named "info" and create a CSV file in the directory and name it "firstpage.csv" with the following fields - Email , Timestamp
Or you can create a notepad file and put "Email","Timestamp" and name the file "firstpage.csv"
Now when you make the directory, password protect it.
Tools I personally recommend getting, you can use whatever you feel most comfortable with.
Notepad++
Description - A general code editor. I use it primairly for Javascript, PHP, and HTML
Download - Notepad++ v6.2 - Current Version
FileZilla
Description - A FTP Client used for managing a webserver.
Download - FileZilla - Client Download
Recommended knowledge -
Language - HTML
Why - To edit the web pages style / appearance.
Tutorials - HTML Tutorial
Language - PHP
Why - To be able to store the information you collect, 99% of the tutorials out there use MySQL, you don't need to use MySQL but it's recommended. But in this tutorial I will be showing you how to store the information without MySQL
Tutorials - PHP Tutorial
Language - CSS
Why - To be able to create StyleSheets for your landing page to give it that little extra oomph style wise.
Tutorials - CSS Tutorial
Language - Javascript
Why - To be able to create the validation. Meaning if the person filling out the offer doesn't input their first name, it will tell them that they must fill out their first name in order to continue. This will not be used in this tutorial, as there is countless ways to use validation. You will have to find your own / create your own.
Tutorials - JavaScript Tutorial
Step: One
Module: Creating the landing page appearance / base.
This will give you a "clean template" to design the landing page.
First off, the standard HTML code brackets.
Code:
<html>
<title> My First Email submit</title>
</html>
Now time to create the form for the capture of the information.
Code:
<form method="post" action="infocapture.php" class="body" name="myform">
<input type="text" name="email" maxlength="80" value="Enter Your Email"/><br/>
<input name="Submit" type="submit" value="Submit" />
<br/>
<font size="1"><i>By clicking submit you are agreeing to our <a href="/privacy.html">Privacy Policy</a> as well as our <a href="/tos.html">Terms Of Service</a></i></font>
</form>
Code:
<form method="post" action="infocapture.php" class="body" name="myform">
the code
Code:
<input type="text" name="email" maxlength="80" value="Enter Your Email"/><br/>
From there, the "infocapture.php" is the page that will store the information and display the rest of the information ex; the second page.
Code:
<?php
$email = $_POST['email']; /* grabs the email from the first page */
$today = date("F j Y g:i a"); /* for the time stamp */
$root = $_SERVER['DOCUMENT_ROOT']; /* get's the root directory of the server */
/* the following code will store the users email and time stamp just incase they don't fill out the second page, you still have their email to build your list */
$file = $root . "firstpage.csv";
$fh = fopen($file,'a') or die("Invaid");$sd = '"' . $email . '"' . ',' .
'"' . $today . '"' .
" \n";
fwrite($fh, $sd);
fclose($fh);
?>
The following part of the code will be the second part of your form, ex; the second page submit.
Code:
<html>
<center>
<table>
<form name="reg" method="post" action="/coregpath.php">
Title:<br/>
<select name="title">
<option value="--">--</option>
<option value="Mr.">Mr.</option>
<option value="Ms.">Ms.</option>
<option value="Mrs.">Mrs.</option>
</select><br/>
First Name:<br/>
<input type="text" value="" name="firstname"/><br/>
Last Name:<br/>
<input type="text" value="" name="lastname"/><br/>
Address:<br/>
<input type="text" value="" name="address"/><br/>
Apt/Suit:<br/>
<input type="text" value="" name="aptsuite"/><br/>
City:<br/>
<input type="text" value="" name="city"/><br/>
State<br/>
<select name="state">
<option value="--" selected="selected">Select</option>
<option value="AL">Alabama</option>
<option value="AK">Alaska</option>
<option value="AZ">Arizona</option>
<option value="AR">Arkansas</option>
<option value="CA">California</option>
<option value="CO">Colorado</option>
<option value="CT">Connecticut</option>
<option value="DE">Delaware</option>
<option value="DC">District of Columbia</option>
<option value="FL">Florida</option>
<option value="GA">Georgia</option>
<option value="HI">Hawaii</option>
<option value="ID">Idaho</option>
<option value="IL">Illinois</option>
<option value="IN">Indiana</option>
<option value="IA">Iowa</option>
<option value="KS">Kansas</option>
<option value="KY">Kentucky</option>
<option value="LA">Louisiana</option>
<option value="ME">Maine</option>
<option value="MD">Maryland</option>
<option value="MA">Massachusetts</option>
<option value="MI">Michigan</option>
<option value="MN">Minnesota</option>
<option value="MS">Mississippi</option>
<option value="MO">Missouri</option>
<option value="MT">Montana</option>
<option value="NE">Nebraska</option>
<option value="NV">Nevada</option>
<option value="NH">New Hampshire</option>
<option value="NJ">New Jersey</option>
<option value="NM">New Mexico</option>
<option value="NY">New York</option>
<option value="NC">North Carolina</option>
<option value="ND">North Dakota</option>
<option value="OH">Ohio</option>
<option value="OK">Oklahoma</option>
<option value="OR">Oregon</option>
<option value="PA">Pennsylvania</option>
<option value="RI">Rhode Island</option>
<option value="SC">South Carolina</option>
<option value="SD">South Dakota</option>
<option value="TN">Tennessee</option>
<option value="TX">Texas</option>
<option value="UT">Utah</option>
<option value="VT">Vermont</option>
<option value="VA">Virginia</option>
<option value="WA">Washington</option>
<option value="WV">West Virginia</option>
<option value="WI">Wisconsin</option>
<option value="WY">Wyoming</option>
</select><br/>
Zip Code:<br/>
<input type="text" value="" name="zip"/><br/>
Email:<br/>
<input name="email2" type="text" value="<?php echo $_POST['email'];?>"><br/>
<!-- <input name="email2" type="text" class="inputtext" value="?php echo $_POST['email'];?"><br/> -->
Date Of Birth:<br/>
<select name="dob_month">
<option value="--">--</option>
<option value="01">January</option>
<option value="02">February</option>
<option value="03">March</option>
<option value="04">April</option>
<option value="05">May</option>
<option value="06">June</option>
<option value="07">July</option>
<option value="08">August</option>
<option value="09">September</option>
<option value="10">October</option>
<option value="11">November</option>
<option value="12">December</option>
</select>
<select name="dob_day">
<option value="--">--</option>
<option value="01">01</option>
<option value="02">02</option>
<option value="03">03</option>
<option value="04">04</option>
<option value="05">05</option>
<option value="06">06</option>
<option value="07">07</option>
<option value="08">08</option>
<option value="09">09</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
</select>
<select name="dob_year">
<option value="1900">1900</option>
<option value="1901">1901</option>
<option value="1902">1902</option>
<option value="1903">1903</option>
<option value="1904">1904</option>
<option value="1905">1905</option>
<option value="1906">1906</option>
<option value="1907">1907</option>
<option value="1908">1908</option>
<option value="1909">1909</option>
<option value="1910">1910</option>
<option value="1911">1911</option>
<option value="1912">1912</option>
<option value="1913">1913</option>
<option value="1914">1914</option>
<option value="1915">1915</option>
<option value="1916">1916</option>
<option value="1917">1917</option>
<option value="1918">1918</option>
<option value="1919">1919</option>
<option value="1920">1920</option>
<option value="1921">1921</option>
<option value="1922">1922</option>
<option value="1923">1923</option>
<option value="1924">1924</option>
<option value="1925">1925</option>
<option value="1926">1926</option>
<option value="1927">1927</option>
<option value="1928">1928</option>
<option value="1929">1929</option>
<option value="1930">1930</option>
<option value="1931">1931</option>
<option value="1932">1932</option>
<option value="1933">1933</option>
<option value="1934">1934</option>
<option value="1935">1935</option>
<option value="1936">1936</option>
<option value="1937">1937</option>
<option value="1938">1938</option>
<option value="1939">1939</option>
<option value="1940">1940</option>
<option value="1941">1941</option>
<option value="1942">1942</option>
<option value="1943">1943</option>
<option value="1944">1944</option>
<option value="1945">1945</option>
<option value="1946">1946</option>
<option value="1947">1947</option>
<option value="1948">1948</option>
<option value="1949">1949</option>
<option value="1950">1950</option>
<option value="1951">1951</option>
<option value="1952">1952</option>
<option value="1953">1953</option>
<option value="1954">1954</option>
<option value="1955">1955</option>
<option value="1956">1956</option>
<option value="1957">1957</option>
<option value="1958">1958</option>
<option value="1959">1959</option>
<option value="1960">1960</option>
<option value="1961">1961</option>
<option value="1962">1962</option>
<option value="1963">1963</option>
<option value="1964">1964</option>
<option value="1965">1965</option>
<option value="1966">1966</option>
<option value="1967">1967</option>
<option value="1968">1968</option>
<option value="1969">1969</option>
<option value="1970">1970</option>
<option value="1971">1971</option>
<option value="1972">1972</option>
<option value="1973">1973</option>
<option value="1974">1974</option>
<option value="1975">1975</option>
<option value="1976">1976</option>
<option value="1977">1977</option>
<option value="1978">1978</option>
<option value="1979">1979</option>
<option value="1980">1980</option>
<option value="1981">1981</option>
<option value="1982">1982</option>
<option value="1983">1983</option>
<option value="1984">1984</option>
<option value="1985">1985</option>
<option value="1986">1986</option>
<option value="1987">1987</option>
<option value="1988">1988</option>
<option value="1989">1989</option>
<option value="1990">1990</option>
<option value="1991">1991</option>
<option value="1992">1992</option>
<option value="1993">1993</option>
<option value="1994">1994</option>
<option value="1995">1995</option>
<option value="1996">1996</option>
<option value="1997">1997</option>
<option value="1998">1998</option>
<option value="1999">1999</option>
<option value="2000">2000</option>
<option value="2001">2001</option>
<option value="2002">2002</option>
<option value="2003">2003</option>
<option value="2004">2004</option>
<option value="2005">2005</option>
<option value="2006">2006</option>
<option value="2007">2007</option>
<option value="2008">2008</option>
<option value="2009">2009</option>
</select><br/>
Cell Phone:<br/>
<input type="text" value="" name="c1" maxlength="3" size=2"/>
<input type="text" value="" name="c2" maxlength="3" size="2"/>
<input type="text" value="" name="c3" maxlength="4" size="3"/>
<br/>
Home Phone:<br/>
<input type="text" value="" name="h1" maxlength="3" size="2"/>
<input type="text" value="" name="h2" maxlength="3" size="2"/>
<input type="text" value="" name="h3" maxlength="4" size="3"/>
<br/>
<br />
<input name="Submit" type="submit" value="Submit"></div>
<font size="1"><i>By clicking submit you are agreeing to our <a href="/privacy.html">Privacy Policy</a> as well as our <a href="/tos.html">Terms Of Service</a></i></font>
</form>
</table>
</center>
</html>
The following will be your co-reg path page where you will place your co-reg offers.
Code:
<?php
$root = $_SERVER['DOCUMENT_ROOT'];
$title = $_POST['title'];
$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$address = $_POST['address'];
$aptsuite = $_POST['aptsuite'];
$city = $_POST['city'];
$state = $_POST['state'];
$email2 = $_POST['email2'];
$dob_month = $_POST['dob_month'];
$dob_day = $_POST['dob_day'];
$dob_year = $_POST['dob_year'];
$c1 = $_POST['c1'];
$c2 = $_POST['c2'];
$c3 = $_POST['c2'];
$h1 = $_POST['h1'];
$h2 = $_POST['h2'];
$h3 = $_POST['h3'];
$affid = $_POST['affid'];
$today = date("F j Y g:i a");
/*print to csv database*/
$file = $root . "/inf/i_full.csv";
$fh = fopen($file,'a') or die("Invaid");
$sd = " \n" . '"' . $today . '"' . ',' .
'"' . $affid . '"' . ',' .
'"' . $firstname . '"' . ',' .
'"' . $lastname . '"' . ',' .
'"' . $address . '"' . ',' .
'"' . $aptsuite . '"' . ',' .
'"' . $city . '"' . ',' .
'"' . $state . '"' . ',' .
'"' . $email2 . '"' . ',' .
'"' . $dob_month . '"' . ',' .
'"' . $dob_day . '"' . ',' .
'"' . $dob_year . '"' . ',' .
'"' . $c1 . '"' . ',' .
'"' . $c2 . '"' . ',' .
'"' . $c3 . '"' . ',' .
'"' . $c1 . '-' . $c2 . '-' . $c3 . '"' . ',' .
'"' . $h1 . '"' . ',' .
'"' . $h2 . '"' . ',' .
'"' . $h3 . '"' . ',' .
'"' . $h1 . '-' . $h2 . '-' . $h3 . '"' . ',' .
'"' . $_SERVER['REMOTE_ADDR'] . '"';
fwrite($fh, $sd);
fclose($fh);
$findemail = $email2;
$filename = 'file.txt';
$searchfor = $findemail;
$fh = fopen($filename, 'r');
$olddata = fread($fh, filesize($filename));
if(!strpos($olddata, $searchfor))
{
// do nothing
$file3 = "file.txt";
$fh3 = fopen($file3,'a') or die("Invaid");
$sd3 = $email2 . "\n";
fwrite($fh3, $sd3);
fclose($fh3);
} else {
// do something
}
?>
Here are the three files completed.
Your index file - where you will collect the users email -
Name: Index.html
Code:
<html>
<title> My First Email submit</title>
<form method="post" action="secpg.php" class="body" name="myform">
<input type="text" name="email" maxlength="80" value="Enter Your Email"/><br/>
<input name="Submit" type="submit" value="Submit" />
<br/>
<font size="1"><i>By clicking submit you are agreeing to our <a href="/privacy.html">Privacy Policy</a> as well as our <a href="/tos.html">Terms Of Service</a></i></font>
</form>
</html>
Your second page submit.
The users' information will be stored in your CSV file.
Make a directory named "info" and create a CSV file in the directory and name it "firstpage.csv" with the following fields - Email , Timestamp
Or you can create a notepad file and put "Email","Timestamp" and name the file "firstpage.csv"
Now when you make the directory, password protect it.