Jump to content

Form Mail HELP!


steviep19

Recommended Posts

Hi

Im fairly new to PHP and would like some help.

I have a form set out in HTML and need it to email an address on submit.

I need it to then redirect to a php page (thanks page)

 

Here is my form....can any one help me with the contactprocess.php file??

 

<form action="contactusprocess.php" method="post">

                <table width="100%" border="0" cellspacing="0" cellpadding="0">

                  <tr>

                    <td class="formref">Referral Location</td>

                    <td><label>

                      <select name="Referral Location">

                        <option value="Chester">Chester</option>

                        <option value="Chester">Liverpool</option>

                          </select>

                    </label></td>

                  </tr>

                  <tr>

                    <td> </td>

                    <td> </td>

                  </tr>

                  <tr>

                    <td class="formref">Referring Practitioner</td>

                    <td><input name="Referring Practitioner" type="text" size="50" /></td>

                  </tr>

                  <tr>

                    <td> </td>

                    <td> </td>

                  </tr>

                  <tr>

                    <td class="formref">Patient’s Name</td>

                    <td><input name="Patient Name" type="text" size="50" /></td>

                  </tr>

                  <tr>

                    <td> </td>

                    <td> </td>

                  </tr>

                  <tr>

                    <td valign="top" class="formref">Practice Address</td>

                    <td><textarea name="Practice Address" cols="38" rows="3"></textarea></td>

                  </tr>

                  <tr>

                    <td> </td>

                    <td> </td>

                  </tr>

                  <tr>

                    <td class="formref">Practice Post Code</td>

                    <td><input name="Practice Post Code" type="text" size="50" /></td>

                  </tr>

                  <tr>

                    <td> </td>

                    <td> </td>

                  </tr>

                  <tr>

                    <td class="formref">Practice Telephone No</td>

                    <td><input name="Practice Telephone No" type="text" size="50" /></td>

                  </tr>

                  <tr>

                    <td> </td>

                    <td> </td>

                  </tr>

                  <tr>

                    <td class="formref">Patient’s Name</td>

                    <td><input name="Patients Name" type="text" size="50" /></td>

                  </tr>

                  <tr>

                    <td> </td>

                    <td> </td>

                  </tr>

                  <tr>

                    <td class="formref">Patient’s Date of Birth</td>

                    <td><input name="Patient DOB" type="text" size="50" /></td>

                  </tr>

                  <tr>

                    <td> </td>

                    <td> </td>

                  </tr>

                  <tr>

                    <td class="formref">Parent’s Full Name</td>

                    <td><input name="Parent Full Name" type="text" size="50" /></td>

                  </tr>

                  <tr>

                    <td> </td>

                    <td> </td>

                  </tr>

                  <tr>

                    <td valign="top" class="formref">Home Address</td>

                    <td><label>

                      <textarea name="Home Address" cols="38" rows="3"></textarea>

                    </label></td>

                  </tr>

                  <tr>

                    <td> </td>

                    <td> </td>

                  </tr>

                  <tr>

                    <td class="formref">Postal Code</td>

                    <td><label>

                      <input name="Postal Code" type="text" size="50" />

                    </label></td>

                  </tr>

                  <tr>

                    <td> </td>

                    <td> </td>

                  </tr>

                  <tr>

                    <td class="formref">Patient’s Telephone No (H)</td>

                    <td><label>

                      <input name="Patient Tel (H)" type="text" size="50" />

                    </label></td>

                  </tr>

                  <tr>

                    <td> </td>

                    <td> </td>

                  </tr>

                  <tr>

                    <td valign="top" class="formref">Patient’s Telephone No (W)</td>

                    <td><input name="Patient Tel (W)" type="text" size="50" /></td>

                  </tr>

                  <tr>

                    <td> </td>

                    <td> </td>

                  </tr>

                  <tr>

                    <td valign="top" class="formref">Patient’s Email Address</td>

                    <td><textarea name="Patient Email" cols="38" rows="3"></textarea></td>

                  </tr>

                  <tr>

                    <td> </td>

                    <td> </td>

                  </tr>

                  <tr>

                    <td class="formref">Nhs/Private</td>

                    <td><select name="select3">

                      <option value="NHS">NHS</option>

                      <option value="Private">Private</option>

                                        </select></td>

                  </tr>

                  <tr>

                    <td> </td>

                    <td> </td>

                  </tr>

                  <tr>

                    <td valign="top" class="formref">Patient’s Oral Condition</td>

                    <td><textarea name="Patient Oral Condition" cols="38" rows="3"></textarea></td>

                  </tr>

                  <tr>

                    <td> </td>

                    <td align="right"> </td>

                  </tr>

                  <tr>

                    <td valign="top" class="formref">Reason of referral to orthodontist</td>

                    <td><textarea name="Reason of referral to orthodontist" cols="38" rows="3"></textarea></td>

                  </tr>

                  <tr>

                    <td> </td>

                    <td align="right"> </td>

                  </tr>

                  <tr>

                    <td> </td>

                    <td align="right"><div id="submitpad"><label>

                      <input name="Submit" type="submit" class="submit" value=" " />

                    </label></div></td>

                  </tr>

                </table>

                            </form>

 

Thanks

Link to comment
Share on other sites

I gave you a resource that tells you exactly how to do what you are trying to do.

But I personally don't believe in handing someone a fully done script when they didn't have anything to start with.

 

Start writing it up, and if you run into problems post in this thread and either myself or others will help you out.

 

Just please realize I don't intend to be cruel or seem like a jerk, I'm just trying to get you interested and learning rather then handing you a spoon full of code.

 

You have to try before you can fail.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.