N
N
ne_pes2019-11-17 21:50:03
PHP
ne_pes, 2019-11-17 21:50:03

How to make JSON order counter?

When paying, you need to specify the order ID, all information about the product is stored in a JSON file (name, price), you need to make a product counter so that the ID increases by 1 with each purchase, i.e. first id = 1, bought the product (php file worked) and id became 2 and so on

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dr. Bacon, 2019-11-17
@bacon

ID is not necessarily auto-increment, use for example UUID

A
alekssamos, 2019-11-18
@alekssamos

read, json_decode, add, json_encode, write.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question