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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:17:28+00:00 2026-05-23T14:17:28+00:00

I have a dynamic form in which i can add and remove textarea. The

  • 0

I have a dynamic form in which i can add and remove textarea.
The name of textareas is MyTextarea[]

<textarea style="display:inline;" name="MyTextarea[]"></textarea>
<textarea style="display:inline;" name="MyTextarea[]"></textarea>

So when I want to treat this textarea with PHP i’m doing a :

echo $_POST['MyTextarea'];

So a Array is display on the screen, up to now it’s ok

So I do a print_r($_POST['MyTextarea']); and I have again the same result : Array

I want to know if it’s possible to have many textarea with same name with [] to generate an array.

If it’s possible how can I do, or what’s wrong with my code.

Thanks

  • 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-23T14:17:28+00:00Added an answer on May 23, 2026 at 2:17 pm

    Which kind of framework are you using, I’m quite sure there is something at one point that is casting you’re array into a string, maybe something that apply a treatment on POST variable like this:

    foreach ($_POST as $key => $value) {
        if ($value && !$is_magic_quotes_gpc) {
            $_POST["$key"] = addslashes($value);
        }
    

    In this case you’ve to remove this function…
    To be sure of what I’m talking about, you can try a var_dump($POST[MyTextarea]) =>string ‘Array’ (length=5) (should be an array)

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

Sidebar

Related Questions

I have a form which is built dynamically using this jQuery plugin http://code.google.com/p/jquery-dynamic-form/ When
I have a dynamic form that I've written in rails. I want to be
I have this table where I can generate dynamic rows (which has input <type=text
I am trying to make a dynamic form which retrives data. How can I
I am trying to use a textarea form entry which I have some javascript
I have custom Question objects which I render into html form elements. I want
I have a web form which has dynamic table using repeating rows. New rows
I am building a dynamic form builder.. And i have a problem which i
Lets say i have a form which have the following : Name:TextBox Email:TextBox Age:TextBox
I have a form in Axapta/Dynamics Ax (EmplTable) which has two data sources (EmplTable

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.