You can get the viewer to email you by using a http mailto:. This works well if they have an email program setup on their computer. If they happen to be on a computer in a public library, this will not do.
Another option is to use mail(). You can get very sophisticated with this function, but for the purposes of this class, we will keep it simple. Note that PHP must be configured to handle this function. Check with your domain host.
mail() has three attributes relating to the To: field, Subject: field and the Message: field. Define the three strings for each of those fields, include them as attributes, call the mail() function and you're done. Here's an example:
You can place this strategically on your page and you have your response setup. I say "strategically" because you do NOT want to put the code as it appears above. If you did, then every time your page was accessed, you would be sent an email. You need to make it a function and only call it if the viewer clicks on a button or something.
To send to more than one addressee, include complete addresses separated by commas (not separated by semi-colons as many email programs do, like Outlook). So, in the example above, we could instantiate as follows: $To = "me@myOffice.biz,you@yourOffice.biz,him@hisOffice.biz";, and the message would go to all three.
That hits everything you need to know about mail(). For an example of a more sophisticated use of this same function, see this emailer I found on the internet (I did not write this code).