"From field" in PHP email form


Posted on 16th Feb 2014 07:03 pm by admin

I used a wizard to create a PHP email form. I was able to customize it with the exception of the From field. I need the email that is sent to be "From" the email that the sender input. Instead it comes "From" a nonexistent email address with "server" in the domain. Here is the processor code I'm using

Code: <?php

$where_form_is="http://".$_SERVER['SERVER_NAME'].strrev(strstr(strrev($_SERVER['PHP_SELF']),"/"));


mail("braintrack@yahoo.com", $_POST['field_3'], "

First Name: " . $_POST['field_1'] . "
Last Name: " . $_POST['field_5'] . "
Email Address: " . $_POST['field_2'] . "
Situation: " . $_POST['field_3'] . "
Message: " . $_POST['field_4'] . "




");

include("confirm.html");

?>
Any help would be greatly apprciated.

No comments posted yet

Your Answer:

Login to answer
101 Like 8 Dislike
Previous forums Next forums
Other forums

Cannot Display Array from Select Statement + Login question
Hi,
I'm new to PHP but so far so goog. I was assigend a project and I'm very close to completion.

Automatic Webpage ??
I have a page www.mysite.com/test.php with a
<form>
<textarea name=&q

PHP url branch??
Functionally, using PHP, I'm doing a test of login input submitted by a user via an html form in a f

Php - mysql select?
hi, i have this code:

Code: <?php
session_start();
// dBase file
include &quo

Array to string conversion
Can anyone help me with this?

Notice: Array to string conversion in /home/..../index.php on l

How To Make More Than One Redirection with PHP on the same page?
Hey im trying to do a direction page where it open differently link direction pages every time som

Output Buffering question
Hi all,

I've been trying to wrap my head around output buffering. So far I've found tons of

socket makes browser hang...
I have a socket server, and I am having a problem at the moment...

A browser sends a http hea

Standard DES encryption script?
Can anybody point me to a tutorial or a short script that shows how to encrypt some text with salt i

php unable to sent email
Hi, guys, I try to send a email through php but unfortunately the mail unable to sent. Here is my co

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash