Protect Your Users Email With PHP and MySQL (Page 1 of 4 )
I remember those days that I used to post my email address on my website. Then out of nowhere, I would start recieving massive amounts of email from these lousy email spam programs out there. It's an absolutely horrific experience to recieve in excess of 50 junk mails per day. The only way you can get away from it is to permanantly abandon your email account and never go back. It's has to be one of the most dreadful things to do, almost like a divorce.
The purpose of this tutorial is to teach you a few things about hiding your user's email addresses on your website, but still enable people a method of getting into contact with your users as well. This feature gives the viewers and users of your website a comfortable feeling that those damn email spiders don't roam through your site cataloging all of the email addresses and selling them to all of these spam companies out there.
The first thing I need to get out of the way is that this tutorial is a follow-on for the Creating a Membership System tutorial. It uses the same database structure. You do not have to use that tutorial first if you know what you are doing and you can modify the scripts in this tutorial to match your database.
The second thing that I need to get out of the way is that this is a tutorial. It's not meant to teach you only the topic, but it's meant to teach you the methods of accomplishing routine tasks and conquering every day problems with PHP and MySQL Web Development. Please, let me repeat, PLEASE take more from this tutorial than just the code. I'm not writing this tutorial is just to give you a chunk of code. I'm writing this to show you the methods I would go about tackling this task. The reason I put this statement in this tutorial is because I am simply overwhelmed with the responses from my last two tutorials. I can not believe that some people absolutely refuse to learn something from a tutorial and all they do is snag the code and then come back asking lots of questions that could be answered if they would take the time to read the tutorial.
Please grab a soda, cup of coffee or even a beer and then begin this tutorial. Take your time and read all of it.
During this tutorial I will show you the following:
How to use a switch navigation system to compact multiple php scripts into one script
How to write your own mail function for easier use and recall it when you need it
How to hide your user's email address completely without ever showing it or displaying it even in the source code of your html
A couple of register_globals defeats to make life easier with register_globals turned off.
How to reduce the amount of code you use for mysql_query and mysql_fetch_array
And some other tips and tricks that I will use througout the tutorial.