Okay, since it is for a class, I will let you do the work. But, I will help you.
First, there are simply two parts to this project.
The first is a simple forms page. The forms page holds your input fields as I think you already know
about. In that part, there is a form and the fields placed inside the form.
The next part is the PHP programming that reads the form fields and load them into the email.
And, of course sends it out. So, it is very simple to do this. You can place the PHP code “inline”
with the HTML code and have it post to itself or you can use a second page.
To make it simpler for you to understand, we will use two pages. the first we can call contact.html
or if you wish, contact.php. (Even though there will be no PHP code in that page.
The second we can call sendmail.php and it will take the data and send it out.
Not really much to this system, just two pages. Lets just get the first page completed first.
Make a simple form with input fields of the items you want to view. Here is a site that explains
it somewhat. Should help… http://www.w3schools.com/html/html_forms.asp
The action field for the form will be “sendmail.php” as a name which is our second page.
So, get that page finished and post it to see what it looks like. (Use the PHP tags button!)
Now onto the second page…
This is just the processing part of the code. It will pull the data from the forms page. It will take
the data and use it in a simple contact form. Therefore, there will be two parts in this. First, grab
the posted data from the form. Next, you should validate the data to make sure it is correct and
no programming was inserted by the user. Lastly, you send an email from the “safe” data.
Actually, here is a link that explains how to do this and is very thorough. No need to rehash it when
this site will show you everything in detail.
http://www.w3schools.com/php/php_form_validation.asp
So, that should be enough info to set up the two pages needed. Once you get the two pages set up
and tested, you can post them here and we can help you spruce them up if needed. Good luck!