$fp = fopen(“form-results.txt”, “a”); fwrite($fp, $_POST[‘Customer’] . “,” . $_POST[‘Project’] . “,” . $_POST[‘Location’] . “,” . $_POST[‘Phone’] . “,” . $_POST[‘Email’] . “,” . $_POST[‘FluidCirculated’] . “,” . $_POST[‘FlowRate’] . “,” . $_POST[‘Temperature’] . “,” . $_POST[‘Density’] . “,” . $_POST[‘Viscosity’] . “,” . $_POST[‘SpecificHeat’] . “,” . $_POST[‘ThermalConductivity’] . “,” . $_POST[‘OperatingPressure’] . “,” . $_POST[‘MaximumPressureDrop’] . “,” . $_POST[‘FoulingResistance’] . “,” . $_POST[‘SurfaceTension’] . “,” . $_POST[‘SpecificEnthalpy’] . “,” . $_POST[‘HeatExchanged’] . “,” . $_POST[‘RequiredGasketmaterial’] . “,” . $_POST[‘RequiredPlatematerial’] . “,” . $_POST[‘Comments’] . “,” . date(“M-d-Y”) . “\n”); fclose($fp);
$customer = $_POST[‘Customer’]; $project = $_POST[‘Project’]; $location = $_POST[‘Location’]; $phone = $_POST[‘Phone’]; $email = $_POST[‘Email’]; $fluidcirculatedhotside = $_POST[‘FluidCirculated1’]; $fluidcirculatedcoldside = $_POST[‘FluidCirculated2’]; $flowratehotside = $_POST[‘FlowRate1’].” “.$_POST[‘FlowRate’]; $flowratecoldside = $_POST[‘FlowRate2’].” “.$_POST[‘FlowRate’]; $temperatureinhotside = $_POST[‘Temperature1’].” “.$_POST[‘Temperature’]; $temperatureouthotside = $_POST[‘Temperature2’].” “.$_POST[‘Temperature’]; $temperatureincoldside = $_POST[‘Temperature3’].” “.$_POST[‘Temperature’]; $temperatureoutcoldside = $_POST[‘Temperature4’].” “.$_POST[‘Temperature’];
$Densityinhotside = $_POST[‘Density1’].” “.$_POST[‘Density’]; $Densityouthotside = $_POST[‘Density2’].” “.$_POST[‘Density’]; $Densityincoldside = $_POST[‘Density3’].” “.$_POST[‘Density’]; $Densityoutcoldside = $_POST[‘Density4’].” “.$_POST[‘Density’];
$Viscosityinhotside = $_POST[‘Viscosity1’].” “.$_POST[‘Viscosity’]; $Viscosityouthotside = $_POST[‘Viscosity2’].” “.$_POST[‘Viscosity’]; $Viscosityincoldside = $_POST[‘Viscosity3’].” “.$_POST[‘Viscosity’]; $Viscosityoutcoldside = $_POST[‘Viscosity4’].” “.$_POST[‘Viscosity’];
$SpecificHeatinhotside = $_POST[‘SpecificHeat1’].” “.$_POST[‘SpecificHeat’]; $SpecificHeatouthotside = $_POST[‘SpecificHeat2’].” “.$_POST[‘SpecificHeat’]; $SpecificHeatincoldside = $_POST[‘SpecificHeat3’].” “.$_POST[‘SpecificHeat’]; $SpecificHeatoutcoldside = $_POST[‘SpecificHeat4’].” “.$_POST[‘SpecificHeat’];
$ThermalConductivityinhotside = $_POST[‘ThermalConductivity1’].” “.$_POST[‘ThermalConductivity’]; $ThermalConductivityouthotside = $_POST[‘ThermalConductivity2’].” “.$_POST[‘ThermalConductivity’]; $ThermalConductivityincoldside = $_POST[‘ThermalConductivity3’].” “.$_POST[‘ThermalConductivity’]; $ThermalConductivityoutcoldside = $_POST[‘ThermalConductivity4’].” “.$_POST[‘ThermalConductivity’];
$operatingpressurehotside = $_POST[‘OperatingPressure1’].” “.$_POST[‘OperatingPressure’]; $operatingpressurecoldside = $_POST[‘OperatingPressure2’].” “.$_POST[‘OperatingPressure’]; $maximumpressuredrophotside = $_POST[‘MaximumPressureDrop1’].” “.$_POST[‘MaximumPressureDrop’]; $maximumpressuredropcoldside = $_POST[‘MaximumPressureDrop2’].” “.$_POST[‘MaximumPressureDrop’]; $foulingresistancehotside = $_POST[‘FoulingResistance1’].” “.$_POST[‘FoulingResistance’]; $foulingresistancecoldside = $_POST[‘FoulingResistance2’].” “.$_POST[‘FoulingResistance’];
$surfacetensionhotside = $_POST[‘SurfaceTension1’].” “.$_POST[‘SurfaceTension’]; $surfacetensioncoldside = $_POST[‘SurfaceTension2’].” “.$_POST[‘SurfaceTension’]; $specificenthalpyhotside = $_POST[‘SpecificEnthalpy1’].” “.$_POST[‘SpecificEnthalpy’]; $specificenthalpycoldside = $_POST[‘SpecificEnthalpy2’].” “.$_POST[‘SpecificEnthalpy’]; $heatexchanged = $_POST[‘HeatExchanged1’].” “.$_POST[‘HeatExchanged’]; $requiredgasketmaterial = $_POST[‘RequiredGasketmaterial1’].” “.$_POST[‘RequiredGasketmaterial’]; $requiredplatematerial = $_POST[‘RequiredPlatematerial1’].” “.$_POST[‘RequiredPlatematerial’]; $comments = $_POST[‘Comments’]; $code= rand(5000, 15000); $date = date(“M-d-Y”);
// send form results through email $to = “fkyaniyan@yahoo.com”; //$to .= “,”.$email; $subject = “Web Form”; $message = ”
Web Form
“; // To send HTML mail, the Content-type header must be set $headers = ‘MIME-Version: 1.0’ . “\r\n”; $headers .= ‘Content-type: text/html; charset=utf-8’ . “\r\n”;
// Additional headers $headers .= ‘From: شرکت مهندسین و صنعت <info@engineers-industry.com>’ . “\r\n”; mail($to, $subject, $message, $headers);
?>
Information successfully send