…And the MAJOR thing I’ve left out before starting my self-publishing journey….
Mailing List!
Okay. For some reason, inside my head, I was thinking I could build a mailing list from emails that subscribe to my blogs. Bad idea. What was I thinking!! I must have picked that idea up from somewhere…. Anywho, my blogs are targeted towards authors and not so much to readers. Plus, some people just aren’t into blogs and just want a notice in their email. For example, like me!
One must remember to think of SELF, who is also a customer. What would SELF like to do whenever SELF would want to hear more about something? I should have started thinking this way when my book was really selling–when Irid went free. Hindsight is 20/20 they say. No matter. It came to me now just when I was on Kindle Boards and someone posted something that made me the light bulb go off! Well….it went off several years later, but it went off and that’s what matters.
I mean, I have a website and I have a “Contact Me” page, but I REALLY didn’t mention anything about how people could learn about new Novels as I get them ready or when one is ready to buy.
It’s one of those DUH! moments.
So, off to figuring out on my website how to update and include a form for people to subscribe. I added it on my main page to the left with a option to click and fill out a form. You can take a look at my form by clicking the teeth:
I like the “clicking the teeth” idea. That’s what I put on my main page of my website too.
I also added a check box to the “Contact Me” page if the person wanted the option to be added to my distribution list to learn more about new novels.
Of course, the HTML for the emails became a problem. I had a form that had more fields than it could handle. It would only allow like four (4) fields to place information into the body of my email when I wanted like five (5) fields. And I had no idea how to make a checkbox, or a pull-down option.
Yep. Hours and days went by on Google to learn how to do those things.
I know there’s the MailChimp option, but, as I mention last year, I wanted something for my webpage, and, now looking back at that blog post, I wasn’t going to spend the time to do all this…. But, I did it anyway.
So, this post is for those of you who want some beginning code to start with on making a mailing list on your own website.
You can see what my form looks like from my Special page.
I learned about mail from making my Contact Form. So, that starting point helped me out with the rest of this stuff.
Here you go…. Code!
You’ll need three (3) pages
1) HTML or PHP page for the form
2) The receiving/processing PHP page for the data collected from the form
3) The “Thank you” page after the “Submit” button is pressed
Page One – HTML
This is the form that has the fields and for people to fill out. It sends it’s data to the process.php page. The name of this page can be anything you want (mailform.htm)
<form action="process.php" method="POST">
<input type="hidden" name="recipient" value="youremail@yahoo.com"> <p align="center" size="30"> <p align="center"><strong> Your name:</strong><br> <br> </form> |
Page Two – Process form
This collects the data from the HTML page. It’s name is process.php. If you notice below, there’s a $body line several times. This is the content of the message that you will see in the body of your email. The "n"; is simply like a line break or paragraph return. It puts line spaces in the body of the email to make things look a lot cleaner.
<?php if($_POST[‘theName’] == ‘addmaillist’){} header("location:sent") ?> |
Page Three – PHP Sent
This is just a normal page that says “Thank you!” and you can design that one any how you like. This page is called sent.php name, which is what the process.php page states to send it’s information in that “header” line location above.
Okay then. That’s about it. I hope this code helps some people out. It will at least give you a starting point to make some improvements later.
Until Next Time!!