How
to Create a simple Subscribe Weform with php
Newsletter Software, Bulk Email Software, Mailing List
Management and Email Marketing Software

MailList Controller
contains a built-in HTML Webform Generator,
which will build the HTML Webform and the
required php-Script for you. There is not
manual coding required.
The MailList Controller HTML Webform
Generator is an easy to use tool to
integrate a html subscribe/remove form in
your existing webpage. The tool will add the
form code to your webpage and will also
create the required php-script.
The webform is based on HTML and PHP, which
is widely spread and available on most
webservers.
The usage is very simple, just add the text
"AMLC-WEBFORM" at the desired
position in your HTML page and select the
HTML file on your hard-drive. The program
will replace the text
"AMLC-WEBFORM" with the form code.
Please click on "HTML Webform
Generator" in the section "Member
Lists"
and follow the instructions on the screen.
See also: Form
for Newsletter Subscription and Removal |
Custom HTML/PHP Sample Code:
If you have PHP installed on your webserver,
then you can use the following code for a simple
PHP Subscribe (Mail) Form. You can use the same
code for Remove, just change the subject to the
remove-keyword ("Remove" by default).
Add the following code to your HTML page:
<form
method="POST" action="enter
the URL to your PHP page here">
<p>Name: <input type="text"
name="Name"
size="20"></p>
<p>Email: <input type="text"
name="Email"
size="20"></p>
<p><input type="submit"
value="Submit"
name="Submit"></p>
</form>
Create a new PHP file (e.g. subscribe.php)
with any texteditor (e.g. notepad) and place it on
your webserver.
Please update the URL in
the HTML form. (e.g. subscribe.php)
<?php
## CONFIG ##
# LIST EMAIL ADDRESS
$recipient = "enter the
lists email address here";
# SUBJECT (Subscribe/Remove)
$subject = "Subscribe";
# RESULT PAGE
$location = "enter the
URL of the result page here";
## FORM VALUES ##
# SENDER
$email = $_REQUEST['Email'] ;
# MAIL BODY
$body .= "Name:
".$_REQUEST['Name']." \n";
$body .= "Email:
".$_REQUEST['Email']." \n";
# add more fields here if required
## SEND MESSGAE ##
mail( $recipient, $subject, $body, "From:
$email" ) or die ("Mail could not be
sent.");
## SHOW RESULT PAGE ##
header( "Location: $location" );
?>
Now save both files to your webserver and click
on "Submit".
The php script will not work on your local
computer - please upload it first. |
|