User Profile

Collapse

Profile Sidebar

Collapse
KHurst
KHurst
Last Activity: Apr 8 '08, 02:43 PM
Joined: Apr 3 '08
Location: Kannapolis, NC
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • KHurst
    replied to Get rid of reCaptcha fields in emails
    in PHP
    This the code I use to build my email message body:

    [PHP]//Build Message Body from Contact Form
    foreach ($_POST as $Field=>$Value)
    //Check for NOT Empty Fields
    if(!empty($Valu e)) {
    $MsgBody .= "$Field: $Value\n";
    }[/PHP]




    This is the body content of the sent email. At the bottom are the reCaptcha fields that I do not want to send:

    First_Name:...
    See more | Go to post

    Leave a comment:


  • KHurst
    started a topic Get rid of reCaptcha fields in emails
    in PHP

    Get rid of reCaptcha fields in emails

    How do I get rid of reCaptcha fields that are emailed when I submit a form? I guess what I am asking is how do you exclude unwanted fields from being posted to email from a form in PHP?

    Thanks,
    Kenny
    See more | Go to post

  • KHurst
    replied to Excluding form fields if values are empty
    in PHP
    Just to help the next person. This is the code that worked for me. Thanks!


    foreach ($_POST as $field=>$value)
    if(!strlen(trim ($vlaue)) < 1) {
    $message .= "$field: $value\n";
    }
    mail($to, $subject, $message);
    See more | Go to post

    Leave a comment:


  • KHurst
    started a topic Excluding form fields if values are empty
    in PHP

    Excluding form fields if values are empty

    I have created a form that I email the submitted results to an email address. The form has several optional fields that I would like to exclude from the sent email if they are empty. Below is the PHP code that I am using now.

    foreach ($_POST as $field=>$value)
    $message .= "$field: $value\n";
    mail($to, $subject, $message);
    See more | Go to post
No activity results to display
Show More
Working...