Hi all, well I have been using this code for a form on my server for a while with no problems. Now I go to another server and it will not work.
Basically I have a self-correcting form that collects the information sends it to a php file which emails the receipient the collected information.
On my server it had to be directed to .../php/quote.php3 . This path would not work on the new server. After playing around with it for a while I found that by changing the path to the same directory and eliminating the php directory the form now goes to the script but will not send any information.
Could someone please tell me what I'm missing. The code I'm using is pasted below. The testing html page is at www.appliancecanada.com/residential/quote.html
Thanks for any help!!!
<?php
$ToEmail = "dlampe@cogeco.ca";
$ToName = "Appliance Canada";
$ToSubject = "Online Residential quote request";
$EmailBody = "Profile: $builder$renovator$propertymanager$newhomebuyer$upgrading\nIndividual's Name: $name\n\nCompany: $company\n\nEmail: $email\n\nAddress: $address\nCity: $city\n\nPhone: $phone\nFax: $fax\n\n
Refrigerator\nBrand: $refbrand\nModel: $refmodel\nQuantity: $refquantity\nDate of Purchase: $refdop\n\n
Ranges\nBrand: $rangebrand\nModel: $rangemodel\nQuantity: $rangequantity\nDate of Purchase: $rangedop\n\n
Cooktops\nBrand: $cooktopbrand\nModel: $cooktopmodel\nQuantity: $cooktopquantity\nDate of Purchase: $cooktopdop\n\n
Microwave\nBrand: $microbrand\nModel: $micromodel\nQuantity: $microquantity\nDate of Purchase: $microdop\n\n
Dishwasher\nBrand: $dishbrand\nModel: $dishmodel\nQuantity: $dishquantity\nDate of Purchase: $dishdop\n\n
Entertainment and Theatre\nBrand: $entbrand\nModel: $entmodel\nQuantity: $entquantity\nDate of Purchase: $entdop\n\n
Ventalation\nBrand: $ventbrand\nModel: $ventmodel\nQuantity: $ventquantity\nDate of Purchase: $ventdop\n\n
Washer/Dryer\nBrand: $washbrand\nModel: $washmodel\nQuantity: $washquantity\nDate of Purchase: $washdop\n\n
Outdoor Cooking\nBrand: $outbrand\nModel: $outmodel\nQuantity: $outquantity\nDate of Purchase: $outdop\n\n
Freezers\nBrand: $freezebrand\nModel: $freezemodel\nQuantity: $freezequantity\nDate of Purchase: $freezedop\n\n
Specialty Items\nBrand: $specialtybrand\nModel: $specialtymodel\nQuantity: $specialtyquantity\nDate of Purchase: $specialtydop\n\n
Other\nBrand: $otherbrand\nModel: $othermodel\nQuantity: $otherquantity\nDate of Purchase: $otherdop\n\nComments: $comments\n\n";
$EmailFooter="This message was sent by: $name from $REMOTE_ADDR If you feel that you recieved this e-mail by accident please contact us at info@delphimedia.com";
$Message = $EmailBody.$EmailFooter;
$redirect = "form-complete.html";
if (!isset($name) || !isset($email) || !isset($phone)) {
header( "Location: form-complete.html" );
}
elseif (empty($name) || empty($email) || empty($phone)) {
header( "Location: form-error.html" );
}
else {
mail($ToName." <".$ToEmail.">",$ToSubject, $Message, "From: ".$Name." <".$Email.">");
header ("Location: $redirect");
}
?>