"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

Do While statement
hi guys,

This may sound trivial but im new to php and as part of an assignmenti have to const

$_GET problem
Hi all,

Have a bit of a problem with a little piece of code, I am not sure if this should be

Greek characters in php
Hi,

I'm making a script and I m using for first time greek characters.
I started to write

Inserting the current date/time while submitting the forum
What do I need to add below to update the current date/time? I have a field in the database called d

Fetching META TAGS through
Hello everybody
I want to fetch meta tags of a domain.
It will be done from following code of

Extract specific information from a PHP Multidimensional Array
Howdy! I've racked my brain over this for 24 hours now. I think it's time I asked for help. I'm lear

Load file in PHP
I have 2 files. The first is a PHP generated XML file that's dependent by 2 inputs. The second is a

Re-Order by ID Number
I have a cms set up for inputting an image, thumb, title, pdf, and eps. When input the database ass

Secure pages Sessions vs. Cookies & session_destroy() help
Im new here and new to PHP, I hope you can help me with some questions.

Im writing my web ap

PHP Error
On my .php page I have a drop down box that has several names in it. When a user clicks the name &am

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