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 9174853
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:49:11+00:00 2026-06-17T16:49:11+00:00

I created a form in html and use php to send email <form action=xxxxxx

  • 0

I created a form in html and use php to send email

<form action="xxxxxx" method="post">
  <textarea rows="15" cols="80" name="texttosend" >
    Here is the list
    1) xxxx
    2) yyyy
    3) zzzz
  </textarea>
  <input type="hidden" name="do"    value="admin" />
  <input type="hidden" name="page"  value="mytext" />
  <input type="submit" class="button" name="sendmail" value="Send" />
</form>

In php, I capture the content of the textarea and send it as html by setting the header of the email as

Content-Type: text/html; charset="iso-8859-1"

However, the email sent out lose all the format (I mean seems all the line return are gone and all line are shown in one line. So I try to wrap the content of textarea within <p> </p> but it doesn’t work again. What’s the right way to send html message in the way as it type in the textarea?

  • 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-17T16:49:12+00:00Added an answer on June 17, 2026 at 4:49 pm

    You can use htmentites()

    echo htmentites($_POST['texttosend']);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

HTML <form action='insert.php' method='POST'> <p><b>Client:</b><input type='text' name='idclient'/> <p><b>Total:</b><br /><input type='text' name='total'/> <p><input type='submit' value='Save'
Here is my html form <div id=create> <form action=index.php method=get id=createform> <input type=text name=urlbox
HTML <div class=cus_input> <form id=category_form method=GET action=<?php echo base_url(); ?>welcome/find/ > <input type=text id=category_input
A couple of months ago I created a form in html/php that would be
I think its easy to create form via only html and do not use
When you have an ASP.Net MVC form created by Html.BeginForm(), how do fields inside
i have create a form (so it's PHP and HTML hybrid-code). it has ability
I use a combination of html/php and javascript to open a new browser window
I have been trying to get php to send a email with a attached
I am trying to send a form to a PHP file via jQuery. The

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.