can you help me with php form processor

Discussion in 'PHP' started by megadanny1, Nov 13, 2010.

  1. #1
    hi everyone
    im having a bit of trouble working out how to get my html form to work with php
    ive managed to get the form to send to the php file 'sendmail.php''
    which then should send the output of the form to my email
    but all i get is a blank email
    please can you tell me what code i should be using in my sendmail.php file?
    thanks
    dan

    here is the forms code
    <form id="form1" name="form1" method="post" action="sendmail.php">
    <p>
    <label>Full Name*:
    <input name="name" type="text" id="name" />
    </label>
    </p>
    <p>
    <label for="address">Address Line 1*: </label>
    <input type="text" name="address1" id="address1" />
    </p>
    <p>
    <label for="address2">Address Line 2: </label>
    <input type="text" name="address2" id="address2" />
    </p>
    <p>
    <label for="address3">Address Line 3: </label>
    <input type="text" name="address3" id="address3" />
    </p>
    <p>
    <label for="phone3">Town or City*: </label>
    <input type="text" name="town" id="town" />
    </p>
    <p>
    <label for="phone2">Postcode: </label>
    <input type="text" name="postcode" id="postcode" />
    </p>
    <p>
    <label for="email">Email Adress*: </label>
    <input type="text" name="email" id="email" />
    </p>
    <h2>What Phones Are You Selling? Enter Upto FOUR.</h2>
    <p>
    <label for="phone4">Phone 1*: </label>
    <input type="text" name="phone1" id="phone1" />
    </p>
    <p>
    <label for="address8">Phone 2: </label>
    <input type="text" name="phone2" id="phone2" />
    </p>
    <p>
    <label for="address9">Phone 3: </label>
    <input type="text" name="phone3" id="phone3" />
    </p>
    <p>
    <label for="address10">Phone 4: </label>
    <input type="text" name="phone4" id="phone4" />
    </p>
    <h3>* denotes required field</h3>
    <p>&nbsp;</p>
    <p>
    <input type="submit" name="submit" id="submit" value="Submit" />
    </p>
    </form>
     
    megadanny1, Nov 13, 2010 IP
  2. lonerunner

    lonerunner Member

    Messages:
    184
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    48
    #2
    Check how you named inportant fields in both files, your html file and php file, they must be exact match. Or you can post your php file here and someone can help you.
     
    lonerunner, Nov 13, 2010 IP