Simple subscriber form — by email

Views: 124 Last modified: July 31st, 2011 Comments: 0

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!

Attachments 1 image(s) & 0 video(s) found.
VN:F [1.9.13_1145]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.13_1145]
Rating: 0 (from 0 votes)
    Subscribe
    Subscribe
    subscribe.zip
    3.8 KiB
    25 Downloads
    Details...
    Bluehost

    Mail this!

    To: From:Sum {1+8} =  
    Anything to add ?

        You must be logged in to post a comment.