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 = 'adrian.moss@hotmail.co.uk' ;

 

/* 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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.