PHP n00b

the mail() function

Moderators: egami, macek, gesf

Post Reply
User avatar
New php-forum User
New php-forum User
Posts: 86
Joined: Mon Jun 04, 2012 10:05 pm
Location: Ankara, Turkey

Tue Jun 05, 2012 10:33 am

The form field values are stored in the $_POST variable. You probably see the field names in the email which is sent out, which probably looks something like this:

Code: Select all

RFQ Below received at: Tuesday, June 5th at 2012 at 9:32 PM from

forename: field value
surname: field value
company: field value
So all you would have to do is pick out the names of the fields, pull the values from the $_POST variable, and shove them into the $subj variable:

Code: Select all

$subj = $_POST['forename'] . ' ' . $_POST['surname'] . ' at ' . $_POST['company'];

Post Reply