Results 1 to 2 of 2

Thread: my contact form wont work in IE but works fine in Firefox

  1. #1
    Join Date
    Jul 2007
    Posts
    9

    Angry my contact form wont work in IE but works fine in Firefox

    For some reason my contact form wont work in IE but works perfectly in firefox..

    here is my html code:
    Code:
    <form method="post" action="contact.php"> 
    <input size=15 name="First_Name">
    <input size=15 name="Last_Name">
    <input size=15 name="Email">
    <input size=15 name="Order_Number">
    <select "name="sendto"> 
    <option value="support@maingear.com">Support</option> 
    <option value="sales@maingear.com">Sales</option> 
    <option value="wendel@maingear.com">General</option>  
    </select>
    <input size=15 name="Phone">
    <input size=56 name="title">
    <textarea name="Message" rows=15 cols=42></textarea>
    <input type="submit" value="Submit" name="submit" />
     </form>
    here is my php code:
    Code:
    <?php 
    $to = $_REQUEST['sendto'] ;
    $from = $_REQUEST['Email'] ;
    $title = $_REQUEST['title'] ;
    $first_name = $_REQUEST['First_Name'] ;
    $headers = "From: $from"; 
    $subject = "Contact Form: $title";
    $fields = array(); 
    $fields{"First_Name"} = "First Name";
    $fields{"Last_Name"} = "Last Name";
    $fields{"Order_Number"} = "Order Number";
    $fields{"Email"} = "Email"; 
    $fields{"Phone"} = "Phone";
    $fields{"Message"} = "Message"; 
    $body = "Website Contact Form\n\n"; 
    foreach($fields as $a => $b){ 	$body .= sprintf("%s: %s\n",$b,$_REQUEST[$a]);
    } $headers2 = "From: noreply@mysite.com";
    $subject2 = "Thank you for contacting us.";
    $autoreply = "Thank you for contacting us. A representative will respond to you as soon as possible, usualy within 48 hours. If you have any more questions, please call us at 1-555-55555.";
    if($send) {print "You have not entered an email, please go back and try again";} else { if($send) {print "You have not entered a First name, please go back and try again";
    } else { $send = mail($to, $subject, $body, $headers);
    $send2 = mail($from, $subject2, $autoreply, $headers2);
    if($send) {header( "Location: http://www.mysite.com/thankyou.html" );
    } else {print "We encountered an error sending your mail, please notify webmaster@YourCompany.com"; } } } 
    ?>
    i appreciate any help i can get.

    thanks

  2. #2
    Join Date
    Jul 2007
    Posts
    9

    Problem resolved

    Looks like i had a syntax error

    Code:
    <select "name="sendto">
    should be

    Code:
    <select name="sendto">

Similar Threads

  1. Moving file input to different form doesn't work in IE7
    By anderzons in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 1
    Last Post: 21 Jan 2011, 09:31 AM
  2. Form won't work when embedded in page
    By behvin in forum Web Design, HTML Reference and CSS
    Replies: 1
    Last Post: 02 Mar 2010, 11:35 AM
  3. Creating Required Fields for a Contact Form
    By Bonanza84 in forum Web Design, HTML Reference and CSS
    Replies: 0
    Last Post: 02 Apr 2009, 11:03 AM

Posting Permissions

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