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

  • Home
  • SEARCH
  • 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 6254831
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T14:15:09+00:00 2026-05-24T14:15:09+00:00

I have a misunderstanding regarding some dynamic row inserts in a MySQL table. All

  • 0

I have a misunderstanding regarding some dynamic row inserts in a MySQL table.

All I want to do is based on the EAV Model:

  • I have a products table which contains products
  • A attributes table which contains attributes (name) for products (group based – related to category)
  • And a product_attribute which contains the value of the attribute

And the user must create this attributes to be associated with a product, and I’m thinking to insert <input> elements with jQuery’s append.

But how to track inserts and how to append them to have a specific name : <input name=''>.

The result should do the following:

<form action='attribute_insert.php' method='post'>
<input name='field1' />
<input name='field2' />
<input name='field3' />
....
<input name='field20' />
</form>

and after processing in attribute_insert.php to insert like this :

('1', '12', 'manufacturer');
('2', '12', 'freq');
('3', '12', 'memory');
('4', '12', 'ram');
....
('20', '12', 'blablabla');

How can I do this … using foreach to scan the $_POST[] or there is a clever method?

  • 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-24T14:15:09+00:00Added an answer on May 24, 2026 at 2:15 pm

    Why not name them field[], then you don’t have to worry about the number. In PHP you can just do a for loop over $_POST['field'], since it will return an array of the fields 😉

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

Sidebar

Related Questions

I may have some misunderstanding regarding the use of the UINavigationControllerDelegate protocol. Here is
I have some misunderstanding about the gslice function. Definition from MSDN states: gslice defines
I have some misunderstanding about the tellp and seekg functions. For example, when I
I have a script that appends some rows to a table. One of the
I have the following code that shows either a bug or a misunderstanding on
this question can create a misunderstanding: I know I have to use CSS to
I have written the following code to perform some simultaneous HTTP posting and file
I have some numbers stored in an NSString. Is it safe to extract them
i have a input tag which is non editable, but some times i need
I have understandably attracted some smart ass answers to some bone head questions I

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.