Jump to content

Recommended Posts

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?

Link to comment
https://forums.phpfreaks.com/topic/67478-dynamically-display-rows-of-data-on-page/
Share on other sites

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.

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.