M
M
Muvka2018-05-29 10:46:45
opencart
Muvka, 2018-05-29 10:46:45

How to organize the storage of several addresses for the user in the database?

Hello. Tell me or give a link to the material, how you can add the address field to the user and, most importantly, so that when you click on the Add address button, another field with the address is added. And to be able to add a few more positions. It really needs to be sorted out. How to do, and most importantly, store these addresses in the database. When one person can have one, and another, say, three.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Ruslan Khakimyanov, 2018-05-29
@Muvka

Clarification: what address do users have - postal or email?
For mail, it is better to create a linked table with at least two fields (id, address). Then just INSERT into it will help you.
You can also do it with e-mail. But if the e-mail does not require further processing, then you can drive them into one field in the user table through ";"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question