.
Developer Spot - Web Development Tutorials
arrowDeverloper Spot  Tutorials  PHP  Publishing Newsletters Using PHP & MySQL 
 
Development Tutorials
ASP
CGI & Perl
CSS
HTML
Java
JavaScript
Linux
PHP
XML




More Resources
Web Hosting Articles
Web Development News
PHP Manual
Create a Survey
Web Design Tutorials
Flash Tutorials
Rank Detective
Web Hosting Directory
Budget Web Hosting Linux Web Hosting Small Business Hosting
Windows Web Hosting Reseller Web Hosting Web Hosting Articles

Publishing Newsletters Using PHP & MySQL

By Amrit Hallan
2004-03-26
Reader Rating: 4 out of 5
Bookmark Print Version
Publishing Newsletter Using PHP & MySQL

Are you tired of using third-party tools to send out routine notifications and emails to your clients? Or, do you want to send your newsletters with individual names of people in the beginning. This series of articles helps you achieve this.

In the first article, you'll learn to create an online subscription form that stores names and emails of people who want to receive your newsletter.

If you are hosting your website on a server that supports PHP and MySQL, through your control panel, you can access an area where you can create either a new database if it doesn't exist, or create a new database. Most servers have the phpMyAdmin interface that lets you create and maintain database without having to learn MySQL commands. Even if you can't make sense of the interface, try to locate a section that allows you to run SQL commands. Run the following command to create the new database:

CREATE DATABASE database_name

In place of "database_name", use the name of your choice. In this case, I'll use "newslet" so that we have:

CREATE DATABASE newslet

A single database can have many tables. Tables are logical structures that contain the rows and columns that store the data. Once our database is created, use the following command to create the table "subscribers":

CREATE TABLE subscribers (
&nbps;s_name TEXT NOT NULL,
&nbps;s_email VARCHAR(255) UNIQUE NOT NULL)

This command creates the table with fields "s_name" (name of the subscriber) and "s_email" (email of the subscriber). We make the email field unique so that we don't accept the same email again and again.

So our database is crisp ready to be used. In my next article, I'll tell you how to create an online form that accepts name and email, perform a bit of validation, and then store the details into the database.


Article Pages:
Publishing Newsletter Using PHP & MySQL

 Rate this article:   Poor          Excellent 


If you found this article interesting, you may want to read these as well:

» Protecting your PHP and HTML Source Code

» Publishing Newsletters Using PHP & MySQL - 4

» Publishing Newsletters Using PHP & MySQL - 3

» Publishing Newsletter Using PHP & MySQL - 2

» Unix Webserver Crontab Basics

» Setting Up Apache, PHP & MySQL On Windows



 
Development Tutorials: CGI & Perl - CSS - HTML - Java - JavaScript - Linux - PHP - XML
More Resources: Web Hosting Articles - Web Development News - PHP Manual