/    Sign up×
Community /Pin to ProfileBookmark

javascript dynamic tables

I have build a form on php page and on this form there is a table which users can add and remove rows to dynamically (I enabled this by javascript code) there are fields in this table users fill them with data, and I set the action for this form to go to a process script in php (proc.php).

The question: I want to collect all the data in these fields (in the dynamic table) and insert them into mysql database, how can I figure out how many rows users add to the table and insert data in and how can I go through each row and collect the data from.

Thanx in advance for any help,

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@FangDec 17.2009 — There are several ways; row.length or getElementsByTagName

How you implement it depends on the html
Copy linkTweet thisAlerts:
@KorDec 17.2009 — 
The question: I want to collect all the data in these fields (in the dynamic table) and insert them into mysql database, how can I figure out how many rows users add to the table and insert data in and how can I go through each row and collect the data from.
[/QUOTE]

The question is:[I] how do you do[/I], first, to add those rows in that table? Another question is: what do you mean by "all the data in these fields"? [I]Which[/I] fields? [I]Where[/I]? A piece of your code would be of great help.
×

Success!

Help @b2009 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...