PDA

View Full Version : help to add a field needed


momotaro
11-27-2008, 07:54 AM
I have added a field in the Contact Page but it doesn't show in the mail.
The field is tagged "name"

I guess I need to add lines to the mailer.php file. So far I added

// load the variables form address bar
$name = $_REQUEST["name"];
$subject = $_REQUEST["subject"];
$message = $_REQUEST["message"];
$from = $_REQUEST["from"];
$verif_box = $_REQUEST["verif_box"];

// remove the backslashes that normally appears when entering " or '
$name = stripslashes($name);
$message = stripslashes($message);
$subject = stripslashes($subject);
$from = stripslashes($from);

Is there something else I need to code?

Thanks

adrianTNT
11-27-2008, 07:57 AM
you need to add $name somewhere in the mail(); function too.

Or do something like this before the mail():

$message = $name . "\n" . $message;

That will add the name at begining of message, then a line break and the message.