Jump to content

Limit sent variables


smordue

Recommended Posts

I am using the following code for my formhandler:

 

<?php
$email = $POST[email];
$mailto = "[email protected]";
$mailsubj = "Website Contact Form submission";
$mailhead = "From: $email\n";
reset ($HTTP_POST_VARS);
$mailbody = "Values submitted from web site contact form:\n";
while (list ($key, $val) = each ($HTTP_POST_VARS)) { $mailbody .= "$key : $val\n"; }
if (!eregi("\n",$POST[email])) { mail($mailto, $mailsubj, $mailbody, $mailhead); }
?>

 

Instead of emailing all of the values, I would like this to only send: name, message, phone and email

 

Thanks for your help!

 

Steve

Link to comment
https://forums.phpfreaks.com/topic/185602-limit-sent-variables/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.