PHP4 Form to work on PHP5 Server HELP!!! =P

I have this code for PHP4, Network Solutions is running PHP5… They want 60 bucks to get this to work on PHP5… lol I am asking for assistance! It is a SWISH Max 4 Flash site that I created.

[php]<?php
$EmailFrom = "[email protected]";// edit
$EmailTo = "[email protected]";// edit
$Subject = “Website Enquiry”;// edit
// -------------- do not edit below--------------
$maintenanceStatusVar = Trim(stripslashes($_POST[‘maintenanceStatusVar’]));
$businessNameVar = Trim(stripslashes($_POST[‘businessNameVar’]));
$quoteVar = Trim(stripslashes($_POST[‘quoteVar’]));
$priorityVar = Trim(stripslashes($_POST[‘priorityVar’]));
$ManufacturerVar = Trim(stripslashes($_POST[‘ManufacturerVar’]));
$modelVar = Trim(stripslashes($_POST[‘modelVar’]));
$serialVar = Trim(stripslashes($_POST[‘serialVar’]));
$cantactNameVar = Trim(stripslashes($_POST[‘cantactNameVar’]));
$phoneVar = Trim(stripslashes($_POST[‘phoneVar’]));
$hoursVar = Trim(stripslashes($_POST[‘hoursVar’]));
$decriptionVar = Trim(stripslashes($_POST[‘decriptionVar’]));
$Body = “”;
$Body .= "Maintenance Status: ";
$Body .= $maintenanceStatusVar;
$Body .= “\n”;
$Body .= "Business Name: ";
$Body .= $businessNameVar;
$Body .= “\n”;
$Body .= "Manufacturer: ";
$Body .= $ManufacturerVar;
$Body .= “\n”;
$Body .= "Model: ";
$Body .= $modelVar;
$Body .= “\n”;
$Body .= "Serial: ";
$Body .= $serialVar;
$Body .= “\n”;
$Body .= "Contact Name: ";
$Body .= $cantactNameVar;
$Body .= “\n”;
$Body .= "Phone #: ";
$Body .= $phoneVar;
$Body .= “\n”;
$Body .= "Business Hours: ";
$Body .= $hoursVar;
$Body .= “\n”;
$Body .= "Priority Level: ";
$Body .= $priorityVar;
$Body .= “\n”;
$Body .= "Request Quote: ";
$Body .= $quoteVar;
$Body .= “\n”;
$Body .= "Problem Description: ";
$Body .= $decriptionVar;
$Body .= “\n”;
$success = mail($EmailTo, $Subject, $Body, “From: <$EmailFrom>”);
?>
[/php]

Hello zelliotts, Instead of passing directly "From: <$EmailFrom>" in mail function. send headers as define below. [php] $headers = 'From: $EmailFrom' . "\r\n" . 'Reply-To: $EmailFrom' . "\r\n" . 'X-Mailer: PHP/' . phpversion();

$success = mail($EmailTo, $Subject, $Body, $headers);
[/php]
For more detail please check below link
http://php.net/manual/en/function.mail.php

I hope this will point you in right direction
Reply your feedback
SR

Still didnt work

[php]<?php
$To = "[email protected]";// edit
$Subject = “Website Enquiry”;// edit
$headers = ‘From: [email protected]’ . “\r\n” .
‘Reply-To: [email protected]’ . “\r\n” .
‘X-Mailer: PHP/’ . phpversion();

// -------------- do not edit below--------------
$maintenanceStatusVar = Trim(stripslashes($_POST[‘maintenanceStatusVar’]));
$businessNameVar = Trim(stripslashes($_POST[‘businessNameVar’]));
$quoteVar = Trim(stripslashes($_POST[‘quoteVar’]));
$priorityVar = Trim(stripslashes($_POST[‘priorityVar’]));
$ManufacturerVar = Trim(stripslashes($_POST[‘ManufacturerVar’]));
$modelVar = Trim(stripslashes($_POST[‘modelVar’]));
$serialVar = Trim(stripslashes($_POST[‘serialVar’]));
$cantactNameVar = Trim(stripslashes($_POST[‘cantactNameVar’]));
$phoneVar = Trim(stripslashes($_POST[‘phoneVar’]));
$hoursVar = Trim(stripslashes($_POST[‘hoursVar’]));
$decriptionVar = Trim(stripslashes($_POST[‘decriptionVar’]));
$Body = “”;
$Body .= "Maintenance Status: ";
$Body .= $maintenanceStatusVar;
$Body .= “\n”;
$Body .= "Business Name: ";
$Body .= $businessNameVar;
$Body .= “\n”;
$Body .= "Manufacturer: ";
$Body .= $ManufacturerVar;
$Body .= “\n”;
$Body .= "Model: ";
$Body .= $modelVar;
$Body .= “\n”;
$Body .= "Serial: ";
$Body .= $serialVar;
$Body .= “\n”;
$Body .= "Contact Name: ";
$Body .= $cantactNameVar;
$Body .= “\n”;
$Body .= "Phone #: ";
$Body .= $phoneVar;
$Body .= “\n”;
$Body .= "Business Hours: ";
$Body .= $hoursVar;
$Body .= “\n”;
$Body .= "Priority Level: ";
$Body .= $priorityVar;
$Body .= “\n”;
$Body .= "Request Quote: ";
$Body .= $quoteVar;
$Body .= “\n”;
$Body .= "Problem Description: ";
$Body .= $decriptionVar;
$Body .= “\n”;
$success = mail($To, $Subject, $Body, $headers);
?>
[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service