Want to create a basic mailing list?

windows

Guest
I've had a couple of people ask me how to make a basic mailing list using PHP. I have made a tutorial on my site that explains how to create a mailing list using PHP and text files. Of course this tutorial can be expanded, but this is only the basics.

Mailing list tutorial (<!-- m --><a class="postlink" href="http://www.dark-street.com/tutorials/php/php_1.html">http://www.dark-street.com/tutorials/php/php_1.html</a><!-- m -->)

Any criticism welcome, PHP gurus!;)not too bad. I would mention why you are using $_POST and not the variable name. so you would want to mention that register globals are off and if they have them on that they are in breach of security and should turn them off. if they don't have them off then you need to write a work around or tell them. but all in all it is not to bad.

except for writing to a text file, it should do :), but mysql is always better and usually comes with the php on the host.

also if you want you can add that link to my page for tutorials on my site. or I can add it to my tutorials and give you the credit.Great job DarkStreetDev and thanks for sharing it.

I would like to mention couple of points though.
I would have used $HTTP_GET/POST_VARS["field"] in order to make the code more portable..($_SERVER['..'] wont work on PHP versions < 4.1)..
Also why not creat only one file ie subscribe.txt and if the user unsubscribes, delete the entry from that file..just a thought :)


cheers

tontogood point tonto, but $HTTP_GET/POST_VARS["field"] are deprectated and shouldn't even be referenced or used. if they are running old software that has security problems than they should upgrade.Thanks for the positive feedback guys.
I have expanded the tutorial and added some "advanced" features.

The new one is found here:
PHP Intermediate Mailing List (<!-- m --><a class="postlink" href="http://www.dark-street.com/tutorials/php/php_2.html">http://www.dark-street.com/tutorials/php/php_2.html</a><!-- m -->)

I also thought about ONE text file, but I only started with PHP a month ago and only know the basics (and text file handling, thanks to StickySauce.com). I do, however, know other programming languages, so PHP isn't THAT hard...yet.

Thanks again.
 
Back
Top