How do I change the From in my form's reply to me. It has this now, but delivers "Apache User"
[code]<?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('jack@andrewsontheweb.com','AB Moving Price Request','AB Moving Quote Form',"Form data:
Your first name:: " . $_POST['field_1'] . " Your last name: " . $_POST['field_2'] . " Your email address:: " . $_POST['field_3'] . " Phone:: " . $_POST['field_4'] . " Fax:: " . $_POST['field_5'] . " [/code]
append a header parameter to the list of arguments to mail().
so go to where mail finishes:
mail('jack@andrewsontheweb.com','AB Moving Price Request','AB Moving Quote Form',"Form data:
... ...
);
change that last line to:
, "From: someone@somewhere.com\r\n");
Log in to post a comment.
How do I change the From in my form's reply to me. It has this now, but delivers "Apache User"
[code]<?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('jack@andrewsontheweb.com','AB Moving Price Request','AB Moving Quote Form',"Form data:
Your first name:: " . $_POST['field_1'] . "
Your last name: " . $_POST['field_2'] . "
Your email address:: " . $_POST['field_3'] . "
Phone:: " . $_POST['field_4'] . "
Fax:: " . $_POST['field_5'] . " [/code]
append a header parameter to the list of arguments to mail().
so go to where mail finishes:
mail('jack@andrewsontheweb.com','AB Moving Price Request','AB Moving Quote Form',"Form data:
...
...
);
change that last line to:
, "From: someone@somewhere.com\r\n");