xander85 Posted August 31, 2007 Share Posted August 31, 2007 Hey All, I'm creating a website that will emulate a cash register system and I'm using a barcode scanner to input products. The barcode scanner simply scans the barcode in as plain text and will put it in the focused form. I can then look up the product based on the code and display the product information. However, how can I make it so I can scan multiple products and dynamically display them on one page after looking up the product information. Example. 1. Scan product..... 2. Look up product information from mysql db 3. Display information for product here - $9.99 4. Look up product information form mysql db 5. Display information for product here - $10.99 etc.... However I want this to be displayed on one website and not save the information back to the database until you tell it to. OR Can I somehow use a "temp" table to do this? Quote Link to comment https://forums.phpfreaks.com/topic/67478-dynamically-display-rows-of-data-on-page/ Share on other sites More sharing options...
Ken2k7 Posted August 31, 2007 Share Posted August 31, 2007 I can't think of much of a way except use the website URL to store the barcode in its plain text and so that if you scan another product, the products you scanned before wouldn't disappear. Afterwards, you just tell the DB to query all the products in the URL, of course you'll have to do some splitting of the URL. Quote Link to comment https://forums.phpfreaks.com/topic/67478-dynamically-display-rows-of-data-on-page/#findComment-338756 Share on other sites More sharing options...
xander85 Posted August 31, 2007 Author Share Posted August 31, 2007 How would you continue to add more "rows" to the url so it displays so 3 or 4 rows and then when you scan another one it adds another row? What is url splitting? Quote Link to comment https://forums.phpfreaks.com/topic/67478-dynamically-display-rows-of-data-on-page/#findComment-338765 Share on other sites More sharing options...
Ken2k7 Posted August 31, 2007 Share Posted August 31, 2007 You don't add rows, you just add the barcode. Something like this: www.whatever.com/index.php?barcode1,barcode2 etc.. And splitting the URL would be to take that URL and split it into an array so you can pull the barcodes right off the url. Quote Link to comment https://forums.phpfreaks.com/topic/67478-dynamically-display-rows-of-data-on-page/#findComment-338771 Share on other sites More sharing options...
xander85 Posted August 31, 2007 Author Share Posted August 31, 2007 Can you give me an example of how to do this? I'm not familiar with this tactic as I am new. Quote Link to comment https://forums.phpfreaks.com/topic/67478-dynamically-display-rows-of-data-on-page/#findComment-338776 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.