PHP Mailing List
This is my PHP Mailing List that I wrote when I didn't feel like signing up for one of those Mailing List services.
Put this little bit of HTML on your webpage in the body wherever you want the box to sign up to be:
Then create a file called list.txt for the emails, and a file called sent.php with the following in it:Code:<p>Type in your email and hit enter to sign up for our mailing list!</p> <form action="sent.php" id="mailinglist" method="post"> <input type="text" name="mail" size="40"> </form>
Enjoy!Code:<?php $email = $_POST['mail']; $date = date("F j, Y"); $all = "Email: " . $email . "\n"; $file = "list.txt"; $handle = fopen($file, "a+"); fwrite($handle, $all); fclose($handle); header ("Location: http://www.YOURWEBSITE'SHOMEPAGE.com"); header("Content-type: text/plain"); print_r(htmlspecialchars(print_r($_POST, 1))); ?>
This is just to make a simple mailing list with PHP, nothing too advanced. To get the list of emails you have to open the file called list.txt
Thanks,
~Flareboy323
Results 1 to 3 of 3
Thread: [Release] PHP Mailing List
Threaded View
- 22 Jul. 2011 01:09am #1
- Join Date
- Apr. 2010
- Location
- When freedom is outlawed only outlaws will be free
- Posts
- 5,113
- Reputation
- 195
- LCash
- 0.25
[Release] PHP Mailing List