Skip to content
Advertisement

Data from database only shows one data and it does not show

Our html/php code shows the name from the database but the rest of them doesn’t show. Although we used the same syntax for every part but we changed the data name same with the database column name.

Why is that so?

Here is our code:

JavaScript

Advertisement

Answer

You can’t fetch same result multiple times.

Just store you fesult in array and then show it trought foreach

JavaScript

And then in you html:

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement