Re: Posting values of dynamically generated text fields at a time
| From: | Richard Quadling | Date: | Tue, 13 Jul 2010 14:21:32 +0000 |
| Subject: | Re: Posting values of dynamically generated text fields at a time | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-306867@lists.php.net to get a copy of this message | ||
On 13 July 2010 15:06, Amit Bobade <amit@e-arth.in> wrote:
> Hi is anybody there to help me out on this?????
>
>>
>> Hi all,
>> I am new to PHP and JS.
>>
>> I am adding new text fields using javascript and I have to save the values
>> of these fields in database in single row. So, how should I post these
>> values? So that I can save them in the db.
>>
>> Additional Info: There are 6 text fields in the row. I have to post the
>> information of all the fields collectively.
>>
>> So, please suggest me a way.........
>> --
>> Thanks and Regards,
>> Amit
>>
>>
>
>
> --
> Thanks and Regards,
> Amit
> eArth Solutions Pvt. Ltd
>
If the <input> tags are added to the <form>, or to an element within
the <form>, then when you submit the form, the newly created elements
will also be submitted.
Whilst you can read the form property of an input element (or
select/textarea), this property is read-only.
Give them a name. If they are a collection of items, then give them a
name like name="something[]" and you will get a $_POST['something']
array (or $_GET if you are using method="get").