27 Sep 06 3:37 am
I am guessing that you have some knowledge of HTML? This is going to require that you work in the "CODE" view of dreamweaver but it really isn't hard. Just takes a little to understand.
You will have 2 pages in this process. Your HTML page with the form on it, and a PHP page which is not seen by the visitors. The answers from your HTML are forwarded to the PHP then sent to your email.
So let us say your contact page on your website is contact.html
For simplicity sake, I am only going to have one thing on the form. A place for visitors to write their name.
An example of the code of this form is like so...
----------------------------------------------------------------------
<form action="contact.php" method="post">
<input type="text" name="name">
<input type="submit" value="Submit" />
<input type="reset" value="Start Over" />
</form>
----------------------------------------------------------------------
What is this telling us? The action of the form will send your answers to a script on a page called contact.php. Do not worry about method="post". That just means to send the information.
Input type specifies what kind of thing is in the form, a radio button, a checkbox etc.... input type="text" means a line you can write in.
Input type="submit" is the submit button to send the form.
Input type="reset" clears the form to start over.
The value is what is written on the buttons.
Now you will notice that the information we need to send has been given a name....
<input type="text" name="name">
We have to name each part of the form something, so when we send information we can distinguish what we are sending. As you can see, this field has been labeled "name".
------------------------------------------------------
Now for our actual script page.
You can just copy and paste this.
----------------------------------------------------
---------------------------------------------------
If you need to add more elements simply place for <input type="text" name="giveitanamehere" /> Also, be sure to change the URL of the thank you page and put your email in there!
Then in the script page just place those values into what is sent to you... so if you added a field for the visitors age you would add this to the code....
This will be confusing at first. Let me know how it goes.
Adrian,