Skip to content
Advertisement

How do I store multiple similar data in a session array in PHP?

I would like to be able to submit multiple times and store the data in a session array to be accessed in other server pages. I’n not sure how to do it.

JavaScript

Advertisement

Answer

In Lab5-2.php you need to store like that:

JavaScript

Obv for prevent Sql Attack use that guide

For you question on comment you can do that:

JavaScript

So for example you have insert product value “pc”, then update next time have “mouse”, you will have “pc,mouse”

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