A table reading data dynamically

Good afternoon,

We are working in a website with PHP and MySQL for running an inventory system.
In the database there will be the products and their features.

I’d like to understand how to fill a table in a page, for instance with 4 columns, where I enter the code of a product in the first column and automatically the information for this product is read from the database and displayed in the other fields and a new row is created for entering a second product and so on.
I’d like to do this without pressing any button or refreshing the page.

Any help would be greatly appreciated.
Thanks a lot.

I think the following demo may me helpful:

Online Demo

Notice the four source file links in the footer. Index.php and footer.php are only required for display purposes.

2 Likes

Depending on the size of your data set, there are also JS solutions to this problem - something like DataTables is perfect - but if you have huge sets of information, loading it all at once behind the scenes is something you won’t want to do.I just thought I’d throw it in there since we dont’ know much about your project.

If you have hundreds of thousands of records, then pulling it dynamically as required is definitely the way to go, I’d say, so carry on and ignore that suggestion :smiley:

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.