Help With Form

Discussion in 'HTML & Website Design' started by geetung, Jun 6, 2007.

  1. #1
    Hope someone can help...try to have an email sent with form data after form submission. It worked the first few times, now it doesn't. Any ideas?

    HTML FORM----------------------------

    <form name="request_info" action='process.php' method='post'>
    <table cellpadding='5' border='0'>
    <tr>
    <td><b><font color='red'>*</font></b>First Name:</td>
    <td><input type='text' size='20' name='fname'></td>
    </tr>
    <tr>
    <td><b><font color='red'>*</font></b>Last Name:</td>
    <td><input type='text' size='20' name='lname'></td>
    </tr>
    <tr>
    <td><b><font color='red'>*</font></b>Email:</td>
    <td><input type='text' size='20' name='email' value=''></td>
    </tr>
    <tr>
    <td><b><font color='red'>*</font></b>Phone:</td>
    <td><input type='text' size='20' name='phone'></td>
    </tr>
    <tr>
    <td><b><font color='red'>*</font></b>Company Name:</td>
    <td><input type='text' size='20' name='Company'></td>
    </tr>
    <tr>
    <td><b><font color='red'>*</font></b>Where can we help?:</td>
    <td><select name='help'>
    <option value='ps'>Please Select...</option>
    <option value='Collections'>Commercial Collections</option>
    <option value='Demand'>Demand Generation</option>
    <option value='Research'>Research</option>
    <option value='other'>Other</option>
    </select></td>
    </tr>
    <tr>
    <td><b><font color='red'>*</font></b>Project Description/Notes:</td>
    <td colspan='2'><textarea name='comments' rows='5' cols='50'></textarea></td>
    </tr>
    <tr>
    <td colspan='2' align='left'><input type='submit' name='submit' value='Submit' style='height:25px;width:100px;'></td>
    <td align='right'><input type='reset' name='clear' value='Clear Form' style='height:25px;'></td>
    </tr>
    </table>
    </form>

    PHP - PROCESS.PHP---------------------------------

    <?php
    ini_set("SMTP", "192.168.1.55");
    ini_set('sendmail_from', "jwong@couch-associates.com");
    @extract($_POST);
    $sendto = "jwong@couch-associates.com";
    $fname = stripslashes($fname);
    $lname = stripslashes($lname);
    $email = stripslashes($email);
    $phone = stripslashes($phone);
    $cname = stripslashes($cname);
    $help = stripslashes($help);
    $comments = stripslashes($comments);
    mail($sendto,"Form Submission","FirstName: $fname\n"."LastName: $lname\n"."Email: $email\n"."Phone: $phone\n"."Company: $cname\n"."Need Help With: $help\n"."Comments: $comments\n");
    header("location:thankyou.php");
    ?>
     
    geetung, Jun 6, 2007 IP
  2. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Well, to start, you shouldn't be using a table to lay out your form like that. Can you post a link to the page with the form?
     
    Dan Schulz, Jun 6, 2007 IP