"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

Did you know?Explore Trending and Topic pages for more stories like this.
$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

Protecting forms
Alright, I want to protect some forms of mine from SQL Injections, because I had someone earlier spa

Warning message
I've put a website that I was doing live and I'm getting this warning message when I try to add a ne

Scene graph using Direct3D?
There are several C++ scene graph based packages available for OpenGl, like say OSG,

http://w

Help with email validation please...
Hi,
Please could you help.
I have a register.php login page where users register, the detail

PHP code for a proxy
I was wondering which function I could use to create an online proxy tool. I was thinking cURL would

Need help with an email blocker for a guessbook
I am new with php and here is a simple guessbook page but I am being hit with spam from a group of t

square instead of number
Hello
I do not know why but this code seems to work fine only in my xampp local insallation but n

Echoing If Function?
A script I am using has If statements in the comments form to basically tell the form what to do. Cu

Problem with coding MySQL query
I'm having heaps of trouble getting one of my PHP/MySQL queries to work for some reason (and the fun

simplexml and xpath - Need some help
Hello,

I am trying to parse an xml which comes back from Amazon and I am trying to know how m

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