Jump to content

E Mail Php Form


Reebokrebel

Recommended Posts

Please can someone advise on the following script why I get no sender in the e mail address header and not the senders e mail address

 

The form works fine but I just keep getting the No Sender"

 

Thanks

 

 

<?php

 

/*Subject and E Mail Variables */

 

$emailSubject = 'Annuity Vault Calculator Quotation Request' ;

$webMaster = '[email protected]' ;

 

/* Gathering Data Variable */

 

$titleField = $_POST['Title'];

$forenameField = $_POST['Forename'];

$surnameField = $_POST['Surname'];

$dobField = $_POST['DOB'];

$telephoneField = $_POST['Telephone'];

$emailField = $_POST['Email'];

$pfvField = $_POST['PFV'];

$smokeField = $_POST['CheckboxGroup1'];

$medicationField = $_POST['CheckboxGroup2'];

 

$body = <<<EOD

<br><hr><br>

Title: $titleField <br>

Forename: $forenameField <br>

Surname: $surnameField <br>

Date Of Birth: $dobField <br>

Telephone Number: $telephoneField <br>

E Mail Address: $emailField <br>

Pension Fund Value: $pfvField <br>

Do They Smoke: $smokeField <br>

Are They On Medication: $medicationField <br>

EOD;

 

$headers = "From: $Email\r\n";

$headers .= "Content-type: text/html\r\n";

$success = mail ($webMaster, $emailSubject, $body, $headers);

 

/* Results Rendered as HTML */

 

$theResults = <<<EOD

<html>

<head>

<title>JakesWorks - travel made easy-Homepage</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<style type="text/css">

<!--

body {

background-color: #f1f1f1;

font-family: Verdana, Arial, Helvetica, sans-serif;

font-size: 12px;

font-style: normal;

line-height: normal;

font-weight: normal;

color: #666666;

text-decoration: none;

}

body p {

font-family: Georgia, "Times New Roman", Times, serif;

}

body p {

font-family: Georgia, "Times New Roman", Times, serif;

font-size: 16px;

color: #390;

}

body p {

font-size: 24px;

}

body p {

text-align: center;

}

-->

</style>

</head>

 

<div>

<div align="left">

<p>Thank You For Your Interest! We Will Contact You Soon With Your Quotation</p>

<p>To Return To Home Page Click Here</p>

<form name="form1" method="post" action="">

</form>

<p><a href="http://annuityvault.co.uk/"><img src="http://www.iconsfeed.com/upload/512/61.png" alt="Home Button icon" width="250" height="250"></a></p>

</div>

</div>

</body>

</html>

EOD;

echo "$theResults";

 

 

?>

Link to comment
https://forums.phpfreaks.com/topic/271717-e-mail-php-form/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.