+ Reply to Thread
Results 1 to 5 of 5

Thread: Help with Form

  1. #1
    wildSaffy is offline Frontpage User wildSaffy will become famous soon enough
    Join Date
    Mar 2007
    Posts
    29

    Default Help with Form

    Hi all,

    Stupid question but hey!! I'm new. I normally use a form creator to make forms but I would like to post this form directly to the website. I have made up the form using my normal form maker - how do I change the HTML so that the form is posted to a specific email address? Any help appreciated. The HTML is as below:

    <form name="contactForm" method="post" action="">
    <input name="subject" type="hidden" id="subject" value="Enquiry About Fleet Services" />
    <table width="30%" style="border: 0px solid #000000; margin: 0; padding: 0; background-color: #FFFFFF;"><tr><td>
    <table width="100%" border="0" cellspacing="0" cellpadding="5">
    <tr bgcolor="#EFEFEF"><td><font color="#000000" size="2" face="Arial">Name of Company</font></td><td><font color="#000000" size="2" face="Arial"><input name="q[1]" type="text" value="" size="50" maxlength="" /></font></td></tr><tr bgcolor="#FFFFFF"><td><font color="#000000" size="2" face="Arial">Address</font></td><td><font color="#000000" size="2" face="Arial"><input name="q[2]" type="text" value="" size="50" maxlength="" /></font></td></tr><tr bgcolor="#EFEFEF"><td><font color="#000000" size="2" face="Arial"> E-mail Address:<font color="#FF0000"> *</font></font></td><td><input name="email" type="text" id="email" size="20" maxlength="100" /></td></tr><tr bgcolor="#FFFFFF"><td colspan="2"><font color="#000000" size="2" face="Arial">Name of Contact<font color="#FF0000"> *</font></font></td></tr><tr bgcolor="#FFFFFF"><td colspan="2"><font color="#000000" size="2" face="Arial"><input name="q[3]" type="text" value="" size="50" maxlength="" /></font></td></tr><tr bgcolor="#EFEFEF"><td><font color="#000000" size="2" face="Arial">Web Address</font></td><td><font color="#000000" size="2" face="Arial"><input name="q[5]" type="text" value="" size="40" maxlength="" /></font></td></tr><tr bgcolor="#FFFFFF"><td><font color="#000000" size="2" face="Arial">No. of Vehicles<font color="#FF0000"> *</font></font></td><td><font color="#000000" size="2" face="Arial"><input name="q[6]" type="text" value="" size="20" maxlength="" /></font></td></tr><tr><td colspan="2"><hr size="1" /></td></tr>
    <tr><td colspan="2"><input name="submit" type="submit" value="Submit" /> </td></tr>
    <tr><td><font color="#FF0000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>*</b></font> <font size="1" face="Verdana, Arial, Helvetica, sans-serif">Required</font></td><td align="right"></td></tr>
    </table></td></tr></table>

  2. #2
    paul's Avatar
    paul is offline ninja SEO paul has much to be proud of paul has much to be proud of paul has much to be proud of paul has much to be proud of paul has much to be proud of paul has much to be proud of paul has much to be proud of paul has much to be proud of paul has much to be proud of paul has much to be proud of
    Join Date
    Dec 2006
    Location
    .de
    Posts
    1,277

    Default

    you need something at the location action="" , that will process your form and email to yourself.
    p

  3. #3
    louie's Avatar
    louie is offline Senior Member louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough louie will become famous soon enough
    Join Date
    Jan 2006
    Location
    Dublin, Ireland
    Posts
    2,328

    Default

    the action="" is not really necessary as the form will be posted to the same page automatically, but it is a good practise to have it set.

    You need some server side code (php. asp) to process the order and email it.
    :. Web Design & Development Web Design Ireland
    :. Search Engines Optimization Search Engines Optimization
    :. Car Parts & Accessories Car Parts
    :. Cars Ireland Cars Ireland
    :. I Have 2 Find It Directory SEF Directory

  4. #4
    ringleader is offline Frontpage User ringleader will become famous soon enough
    Join Date
    Apr 2008
    Location
    Dublin
    Posts
    15

    Default

    Code:
    <form name="contactform" action="index.php?$session[sessionurl]do=messageme" method="post">
    
    // Parts of the form.
    
    </form>
    
    if ($_POST['messageme'])
    {
       // process and send message
    }
    
    The first part is your form displayed to the user to input things to.

    When submitted, it goes to the 'messageme' part of your php code and executes what is in that part of the code (presumably emailing you the form contents).
    Last edited by ringleader; 12-05-2008 at 11:44 AM.

  5. #5
    wildSaffy is offline Frontpage User wildSaffy will become famous soon enough
    Join Date
    Mar 2007
    Posts
    29

    Thumbs up

    Thanks guys - you have been very helpful.

+ Reply to Thread

Similar Threads

  1. form problems
    By vijay in forum HTML Basics
    Replies: 1
    Last Post: 15-01-2008, 10:42 AM
  2. form sending without php
    By Joseph Grogan in forum Coding Help
    Replies: 5
    Last Post: 05-09-2007, 01:32 PM
  3. Contact Form
    By bucks in forum Coding Help
    Replies: 10
    Last Post: 07-02-2007, 09:06 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Optimization by vBSEO

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64