DaBotta Posted December 29, 2014 Share Posted December 29, 2014 Hello , I am trying to make some script for personal use I had create a database like "warehouse" . I managed to check all products, to change the number of pieces I / price etc.What I fail to create a page of "sale" in which you can add more products that are sold to a customer and that in the end to be stored in a sales table, to which I have access later for guarantees example.I fail to understand how to create that sales page. I know I need to use sessions to add each item to be sold. But here I actually stuck and do not know how to go further.How do I change stock every product sold, how to send these products to be inserted into the sales table with a unique code etc ....I hope you understand about what I want to get, and someone to help me, or give me an idea.Thank you very much. Quote Link to comment https://forums.phpfreaks.com/topic/293497-help-warehouse-script/ Share on other sites More sharing options...
mac_gyver Posted December 29, 2014 Share Posted December 29, 2014 your questions are about application design, moving thread to that forum section... Quote Link to comment https://forums.phpfreaks.com/topic/293497-help-warehouse-script/#findComment-1501054 Share on other sites More sharing options...
DaBotta Posted January 2, 2015 Author Share Posted January 2, 2015 but here nobody will answer...... Quote Link to comment https://forums.phpfreaks.com/topic/293497-help-warehouse-script/#findComment-1501524 Share on other sites More sharing options...
mac_gyver Posted January 2, 2015 Share Posted January 2, 2015 that's because it's not entirely clear what you are stuck at doing or what your specific question is about. start by telling us or showing us what your input data is, what processing you need to perform on that data, and what result or output you expect from the processing of that data. to use an analogy, you are asking someone to draw you a map showing how to navigate between two locations. without knowing your exact starting location and destination, no accurate map between those two points can be drawn. Quote Link to comment https://forums.phpfreaks.com/topic/293497-help-warehouse-script/#findComment-1501539 Share on other sites More sharing options...
DaBotta Posted January 2, 2015 Author Share Posted January 2, 2015 The whole ideea is.... I have some product list , when i click on them they will showed on a sale page ( like a shopping cart ) with the other details of the client. The thing that i don't know , how to add all of that products from the sale page to a table "sales" when a FINISH button is pressed. Quote Link to comment https://forums.phpfreaks.com/topic/293497-help-warehouse-script/#findComment-1501561 Share on other sites More sharing options...
ignace Posted January 3, 2015 Share Posted January 3, 2015 INSERT INTO table (columns, ..) VALUES (values, ..); Quote Link to comment https://forums.phpfreaks.com/topic/293497-help-warehouse-script/#findComment-1501580 Share on other sites More sharing options...
DaBotta Posted January 4, 2015 Author Share Posted January 4, 2015 I know this , but i need to know how to inserd data from a session ... Quote Link to comment https://forums.phpfreaks.com/topic/293497-help-warehouse-script/#findComment-1501641 Share on other sites More sharing options...
ignace Posted January 4, 2015 Share Posted January 4, 2015 Something along the lines of: foreach ($_SESSION['cart'] as $line) { $sql = 'INSERT INTO table (column, ..) VALUES (?, ..)'; $stmt = mysqli_prepare($db, $sql); $stmt->bind_param('s..', $var1, $var2); $stmt->execute(); } Quote Link to comment https://forums.phpfreaks.com/topic/293497-help-warehouse-script/#findComment-1501672 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.