php Form Help?

    Date: 01/14/09 (PHP Community)    Keywords: php, html, web

    Hi, all. I'm trying to do my first form and am having trouble getting any of the fields to show up in the email. What I get is an email with from: "email address" subject="Website Form Request" and that's it, nothing in the content field at all. Here's what I have:

    HTML:
    <form method="post" action="sendmail.php">
    First Name:
    <input name="firstname" type="text"><br>
    Last Name:
    <input name="lastname" type="text"><br>
    Company: <input
    name="company" type="text"><BR>
    Email: <input name="email"
    type="text"><br> Phone:
    <input name="phone" type="text"><br>
    Address 1:
    <input name="address1" type="text"><br>
    Address 2:
    <input name="address2" type="text"><br>
    City: <input
    name="city" type="text"><br>
    State: <input name="state"
    type="text"><br> Zip
    Code: <input name="zipcode"
    type="text"><br> Comments:
    <br> <textarea
    name="message" rows="15" cols="40">
    </textarea><br>
    <input type="submit"> </form>

    php:
    <?php $firstname
    = $_REQUEST['firstname'];
    $lastname = $_REQUEST['lastname'];
    $company =
    $_REQUEST['company']; $email
    = $_REQUEST['email'] ;
    $phone =
    $_REQUEST['phone']; $address1
    = $_REQUEST['address1'];
    $address2 = $_REQUEST['address2'];
    $city =
    $_REQUEST['city']; $state
    = $_REQUEST['state'];
    $zipcode = $_REQUEST['zipcode'];
    $comments =
    $_REQUEST['comments']; mail(
    "taniahharrison@gmail.com", "Website Form
    Request",
    $message, "From:
    $email" );
    header( "Location: thankyou.php"
    ); ?>

    [EDIT: Fixed. Thanks!]

    Source: http://community.livejournal.com/php/653439.html

« php driven image gallery -... || Working with multi arrays »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home