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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T06:56:17+00:00 2026-05-13T06:56:17+00:00

I have a text area and I would like to take the input of

  • 0

I have a text area and I would like to take the input of the text area and merge it all together. Everything works fine except that it’s escaping the quotes. For example test's is outputted as test/'s

To fix this I tried htmlenttries such as,

<?php $inputtext= $_POST['textinput'];
        $encodetext = htmlentities($inputtext);
        $finaltext = html_entity_decode($encodetext);

        echo '<p>'.$finaltext .'</p>';  ?>

This should work according to the html_entity_decode manual (unless I read it wrong which could very likely be the case)

  • 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-05-13T06:56:17+00:00Added an answer on May 13, 2026 at 6:56 am

    The solution is probably for you to strip slashes.

    The slashes are automatically added when data comes from POST or GET. This is known as magic quotes and by default are enabled.

    You can remove these slashes by using stripslashes()

    <?php
    
    $text = $_POST['txtarea']; // from textarea
    if(get_magic_quotes_gpc()){
      $text = stripslashes($text);
      // strip off the slashes if they are magically added.
    }
    $text = htmlentities($text);
    // what htmlentities here does is really to convert:
    //   & to &amp;
    //   " to &#039;
    //  and change all < and > to &lt; and &gt; respectively. this will automatically disable html codes in the text.
    echo '<pre>'.$text.'</pre>';
    
    ?>
    

    See: http://php.net/manual/en/function.stripslashes.php

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a single text area input that I would like to get as
I have a text area on which I would like to listen to change
I have a text input field like text box or text area. I want
I have a text area where user can write his SMS. You all know
I would like to have a URL such as www.google.com/ and a user input
I have a text input area attached to a radio button in an HTML
I would like to create a web form with something like a text area.
I have a loop that runs through a text area's line and processes each
I have a PHP Script which has several text areas. What I would like
I would like to call a text area on click of a specific div,

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.