How do I create a simple checkout flow for a mobile app and update it in the mysql database?

I am creating an ecommerce app for my website. This is the first time I am developing an application. At the moment, I am using the phone difference to get the job done for me. But I am stuck at this particular place, I made a cart and it works great and I made the checkout form separately. But I don't know how to pass product information from the cart to the checkout thread and then update it in the database. At the moment, I am sending product parameters via a url, but I know it is not secure. and i use

 location.search.string(1)

      

to get all product parameters from cart and then attach them to form data and submit them to php file and then add it to database. Again in the database I have a different problem. I maintain two different tables, one for orde information and one for products. But the problem here is that I don't know how to link the two tables i.e. When a new order is created, it is assigned an order id, now I don't know how to get this order id and use this order id to update the product information in the product table. So can someone help me with these two problems.

I am using jquery and html to build my app and php and mysql for the back end.

early.

+3


source to share





All Articles