"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

PHP Programming error. Please help!
Hi there,

Am making a website for a friend and have encountered a problem that i need fixing

Need help: how to catch acess of undefined class properties
Hello. I am learning OO with PHP and have hit a problem.
Some code runs as perfectly valid code,

Database connection failure
Hello All,

I am trying to create new connection to Oracle DB 10.1,
I could not see a

get the country of visitor and display content based on that
Hello all,

I have seen that Google analytics can tell you where a visitor is coming from and

how to use two buttons with php
hi i have one form. there are three fields which are to be filled by the user. and then there are tw

Function to extract email attachments using PHP IMAP
function extract_attachments($connection, $message_number) {

$attachments = array();

Simple Scraper... Weird Output
Okay, maybe I just need a Blue Monster and some sleep, but....

I'm scraping a ringtone site

cPanel API
Hi Guys,

Need a little guidance. I'm trying to get my script to communicate with cPanel (or W

Facebook status update API
Hello,

So, I'm trying to create my first Facebook application with PHP.

Basic ideas fo

Check before inserting in DB ???
This is my code
---------------
if ( $_POST ['Submit'])
{{
$username = $_POST ['usernm

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