Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9199795
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T22:37:02+00:00 2026-06-17T22:37:02+00:00

In my pages i have form that has several textarea, i need a method

  • 0

In my pages i have form that has several textarea, i need a method to gather all of the textareas in one email and then send it.

I need a method that i can add it to each page and do this automatically instead of referencing each textarea by name.

$email_body = "You have received a new message from the user $name. \r\n".
    "Here is the answer to the $step. \r\n $message \r\n Comments:$comments.\r\n".

Instead of $message i want all textareas.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T22:37:04+00:00Added an answer on June 17, 2026 at 10:37 pm

    Let’s re-write this whole answer.

    HTML form:
    [index.html]:

    <html>
    <body>
    <form action="php_file.php" method="post">
    <input type="text" name="field_1"/>
    <input type="text" name="something_else"/>
    <input type="text" name="third_field"/>
    <input type="submit" name="submit" value="send!"/>
    </form>
    </body>
    </html>
    

    PHP file (processor):
    [php_file.php:]

        $email_body = '';
        foreach($_POST as $key => $value)
        {
            $email_body .= "Field name: ".$key . "Value: ".$value."<br />";
        }
    
    //send email with $email_body as the email body!
    $to = "someone@example.com";
    $subject = "Test mail";
    $message = "Hello! This is a simple email message.";
    $from = "website@stacksomething.com";
    $headers = "From:" . $from;
    mail($to,$subject,$email_body ,$headers);
    echo "Email was sent!";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a page that has several ajax submission forms. Each form has a
I have a form that has several controls: ProgressBar at the top of the
I have an ASP.NET web form that has a container usercontrol that hosts several
I have a situation with a form that stretches over several pages (might not
I have A single page that has the following structure <form runat=server><placeholder></placeholder></form> I have
So i have a form that on paper is 40 pages long. I was
I have a two forms on a page. The first one has several quantity
I have a web form which is split up into several HTML pages. I
I have a page that has several ListBox es that have some cascading filtering
Usage: I have a form that has a select drop-down that's controlled by another

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.