james_rm
08-06-2008, 04:11 PM
Hi Guys,
Just a quick question I have to create multiple forms for different car inquires I was just wondering if I am able to include a Title tag from the page into the email that is sent with the customers details on it?
<?php
$to = 'jca@*****.co.uk';
$from = 'Contact Form';
$name = $_REQUEST['Name'];
$headers = "From: $from";
$subject = "Contact Form | $name";
$fields = array();
$fields{"Name"} = "Name";
$fields{"Number"} = "Number";
$fields{"Email"} = "Email";
$fields{"Message"} = "Message";
$body = "We have received the following information:\n\n";
foreach($fields as $a => $b){ $body .= sprintf("%50s: %s\n",$b,$_REQUEST[$a]); }
$send = mail($to, $subject, $body, $headers);
?>
This is the form code I am using I am wanting to display the Title of the page that has the submit button on.
Just a quick question I have to create multiple forms for different car inquires I was just wondering if I am able to include a Title tag from the page into the email that is sent with the customers details on it?
<?php
$to = 'jca@*****.co.uk';
$from = 'Contact Form';
$name = $_REQUEST['Name'];
$headers = "From: $from";
$subject = "Contact Form | $name";
$fields = array();
$fields{"Name"} = "Name";
$fields{"Number"} = "Number";
$fields{"Email"} = "Email";
$fields{"Message"} = "Message";
$body = "We have received the following information:\n\n";
foreach($fields as $a => $b){ $body .= sprintf("%50s: %s\n",$b,$_REQUEST[$a]); }
$send = mail($to, $subject, $body, $headers);
?>
This is the form code I am using I am wanting to display the Title of the page that has the submit button on.