Hi Folks
I'm relatively new to PHP so please excuse my ignorance where it shows through.
I have a contact form on a website that sends perfectly well but when it is received the "From" box shows "CGI-Mailer" I would like to replace that with the senders email address that they have to enter on the contact form if at all possible.
The code I am using is:
<?php
$where_form_is="http://".$_SERVER['SERVER_NAME'].strrev(strstr(strrev($_SERVER['PHP_SELF']),"/"));
session_start();
if( ($_SESSION['security_code']==$_POST['security_code']) && (!empty($_POST['security_code'])) ) {
mail("mail@example.co.uk","Blah Blah - Website Contact","Contact Form Data:
Title: " . $_POST['field_1'] . "
First Name: " . $_POST['field_2'] . "
Last Name: " . $_POST['field_3'] . "
Your email address: " . $_POST['field_4'] . "
Your phone number: " . $_POST['field_5'] . "
Message: " . $_POST['field_6'] . "
");
include("confirm.html");
}
else {
echo "Invalid Captcha String.";
}
?>
Any help would be most appreciated, thank you
DezB1