Storing users contact info
This example will show how to create a database , then create a table in this database and then log a users email address and name in the database . This will be the basics of creating a newsletter system using PHP and MySQL.
First of all we will create our database using MySQL , enter the following at the command prompt.
CREATE DATABASE email;
USE email;
CREATE TABLE email(id int DEFAULT'0' NOT NULL auto_increment,
name VARCHAR(75) , email VARCHAR(50),
PRIMARY KEY(id));
Now we will check that everything is Ok by entering the following
DESC email;

That is perfect just what we are looking for , in the next part we will create our form that users fill in and also the script for storing this information in our database.
Back to index , Forward to section 2 |