Hi, for a web development project, i need to send data from my database to my index.ejs, to display. It's a success ! Now I would like recover the same data and send to another collection in my database.
(I display my products with "products collection", and when the user clicks on "buy", the product is sending to "basket collection".)
If somebody can help me. I have my two functions on the same .js.
I attached the screen of index.ejs and method.js (where I do my functions).
index.ejs (display) :
method.js (function basket) :
method.js (function products to display on index.ejs) :