This simple subscriber script allows you to set-up a database where people can subscribe to your newsletter, news or whatever you want.
Features
- User can subscribe | Email verification
- User can delete his email | Email verification
Steps
- Upload the files to your webserver (All in 1 directory/map)
- Delete the file ‘table.sql’ from your webserver
- Take care that the table is created in your database (Import or Query)
- Change your config.php as described below
Before you can use it, you have to change the config.php as shown below.
Change config.php
- $user -> Your db user
- $password -> Your db user password
- $db -> Your db
- FROM_MAIL -> Mail address which subscribers should see when they receive the activation mail
- LOCATION -> Direcotry where this script is stored. Including you’re domain
config.php
error_reporting(E_ALL);
/**
* Establish database connection and select database accordingly
* Fill in -> $host, $user, $password and $db
*/
$host = 'localhost';
$user = '';
$password = '';
$db = '';
if (!@mysql_connect($host, $user, $password))
{
die('Database connection could not be established '. mysql_error());
}
if (!@mysql_select_db($db))
{
die('Database could not be selected '. mysql_error());
}
/**
* General settings
* YOU DO NEED TO CHANGE THIS
*/
/** The email address you want the visitors to see when they receive the activation email
* Example: From: No-reply <no-reply@example.com>
*/
define('FROM_MAIL','From: No-reply <no-reply@example.com>');
/* Current domain and directory where subscribtion package is located
* Example: http://example.com/scripts
* IMPORTANT NOTE: PUT NO / at the end!
*/
define('LOCATION', 'http://example.com/subscribe');
What do you need to do more.
- Run the table.sql on your database. You can do this by the import function or just run a new query.
- No CSS included, so you may take care of this
You can call the form, by calling form.php!
Mail this!
- Comments (0)
- PingBacks (0)
- TrackBacks (0)



» Latest comments