Jump to content

rachelexodus

New Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by rachelexodus

  1. My PHP form works fine in other browsers, but in IE the form is never emailed. It takes you to the "thank you" page, so it seems like it's working, but the email never goes through.

     

    Here is my php code:

    <?php
    if(isset($_POST["Submit"])){
         $to="email@email.com";
         $from=$_POST["Email"];
         if($from == ""){
               echo "Please specify your email address";
               die();
         }
         //At first the message is blank
         $message="";
         //Loop through all the field and put together the message
         foreach($_POST as $fieldName => $value){
               if($fieldName!="Submit"){
                     $fieldValue=$value;
                     $message= $message."$fieldName: $fieldValue
    ";
               }
         }
         $html_header.= "\r\nContent-type: text/html; charset=iso-8859-1;";
         $headers="From:".$from.$html_header;
         $subject="Contact Us Submission";
         if(mail($to, stripslashes($subject), stripslashes($message),$headers)){
               header( "Location:  http://www.site.com/thankyou.html");
               die();
         }else{
               header( "Location: http://www.site.com/error.html");
               die();
         }
    }
    ?>

     

    And here is my form:

     
    
    
    First Name
    
    A value is required.
    
    
    Last Name
    
    A value is required.
    
    
    
    Email
    
    A value is required. 
    
    
    
    Phone
    
    
    
    Address
    
    
     
    
    
    City
    
    
    State
    
    Please Select
    ALABAMA
    ALASKA
    AMERICAN SAMOA
    ARIZONA
    ARKANSAS
    CALIFORNIA
    COLORADO
    CONNECTICUT
    DELAWARE
    DISTRICT OF COLUMBIA
    FEDERATED STATES OF MICRONESIA
    FLORIDA
    GEORGIA
    GUAM
    HAWAII
    IDAHO
    ILLINOIS
    INDIANA
    IOWA
    KANSAS
    KENTUCKY
    LOUISIANA
    MAINE
    MARSHALL ISLANDS
    MARYLAND
    MASSACHUSETTS
    MICHIGAN
    MINNESOTA
    MISSISSIPPI
    MISSOURI
    MONTANA
    NEBRASKA
    NEVADA
    NEW HAMPSHIRE
    NEW JERSEY
    NEW MEXICO
    NEW YORK
    NORTH CAROLINA
    NORTH DAKOTA
    NORTHERN MARIANA ISLANDS
    OHIO
    OKLAHOMA
    OREGON
    PALAU
    PENNSYLVANIA
    PUERTO RICO
    RHODE ISLAND
    SOUTH CAROLINA
    SOUTH DAKOTA
    TENNESSEE
    TEXAS
    UTAH
    VERMONT
    VIRGIN ISLANDS
    VIRGINIA
    WASHINGTON
    WEST VIRGINIA
    WISCONSIN
    WYOMING
    
    
    
    Zip Code
    
    
    Comments
    
    
    
    Where did you
    
    
    hear about us?
    
    
    
    
    
     
    
    
    
    
    

     

    Any help is greatly appreciated! I'm a beginner to PHP and this is my first go at it.

     

    ~Rachel

×
×
  • Create New...