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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T05:17:29+00:00 2026-06-07T05:17:29+00:00

I have got a page with data generated client-side that is formatted as a

  • 0

I have got a page with data generated client-side that is formatted as a fifteen column array. The number of rows will vary based on user input, anywhere between 1 and 200 total. I want to pass this array to my server in an efficient manner where it will be inserted into a MySQL database using php, but I don’t know how the data should be packaged for transport. The data in the page is generated using JavaScript and is laid out in this fashion:

<div id="row1" class="row">
  <span id="entry1">User generated data.</span>
  <span id="entry2">User generated data.</span>
  <span id="entry3">User generated data.</span>
  ...
  <span id="entry15">User generated data.</span>
</div>
<div id="row2" class="row">
  <span id="entry1">User generated data.</span>
  <span id="entry2">User generated data.</span>
  <span id="entry3">User generated data.</span>
  ...
  <span id="entry15">User generated data.</span>
</div>

Recommendations anyone?

  • 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-07T05:17:31+00:00Added an answer on June 7, 2026 at 5:17 am

    I don’t think it is canon to repeat the same ID multiple times.

    <div id="row1" class="row">
      <span id="entry1">User generated data.</span>
      <span id="entry2">User generated data.</span>
      ...
    <div id="row2" class="row">
      <span id="entry1">User generated data.</span>
    

    I’d use compound IDs:

    <div id="row1" class="row">
      <span id="entry1_1">User generated data.</span>
      <span id="entry1_2">User generated data.</span>
      ...
    <div id="row2" class="row">
      <span id="entry2_1">User generated data.</span>
      ...
    

    At that point you can:

    • build a POST query with all items as key/values:
      entry1_1=User generated data.
      …

      which will be easily parseable by PHP, or:

    • build a JSON string in Javascript as a dict of dicts
      { row1: { entry1: “User generate data” }, row2: {…}

    • you might try to preparse the array for PHP by submitting fields
      like this:

      entry[1][1]=User generated data.

      ( “entry[1][1]” is the name of the key. PHP should parse it correctly).

    You could also, depending on how you create new items, directly create a POST FORM, appending fields like this to the DOM:

    <input type="text" name="entry[7][14]" value="" class="input" />
    

    Sorry, but without a better idea of your interaction design, it is awkward to make suggestions.

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

Sidebar

Related Questions

I have got a form that posts values to a page in a wizard.
I have a selection list that is generated dynamically, it lists a number of
I've got a page which will have about ten drop down lists which are
I have got an ASP page that does some back-end processing. It calls a
I have got a literal control on page (with some data on it). i
I have a page that pulls together aggregate data from two different tables. I
On my page in IE8, I have got some text which gets changed through
I have a standard textbox and I've got jQuery on the page. I want
I have several pages to do with several table on each page. I've got
I have a dynamic drop down box which calls another PHP page. I've got

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.