View Single Post
Old 06-10-2009, 05:46 PM
Posts: n/a
Default Simple Newsletter script

I need to have some newsletter form on my web, where you can subscribe it, so probably it will be usefull for the others. It is very simple and has two forms: first is the e-mail and I added additional, that is the category (of the newsletter). The source code is:

<form action="send.php" method="post" name="form2">
<input type="text" size="20" name="emailaddr" value="@"><br><br>
<input type="text" size="20" name="category" value="vsetko"><br><br>
<input type="submit" value="Odoslať/Submit">
This is the code, that you import to your HTML file. Than you need to create independent file named "send.php", where you will write:

$to = "";
$useremail = $_POST['emailaddr'];
$category = $_POST['category'];
$subject = "Subject of the email";
$message1 = "Email: ".$useremail;
$message2 = "Kategória: ".$category;
header("Location: ./index.htm");
And it should look like this (of course I added also the text and the picture):

Reply With Quote