"Steve" <ra***********@hotmail.com> wrote in message
news:J%lcd.194856$wV.85898@attbi_s54...
I will be starting to work on an e-commerce web site pretty soon, and
one thing the user would like to do is to have a part of the site that
he could use in the store for recording the transaction. To accommodate
this, our (myself and the other programmer) thought was to use a bar
code scanner to get the product info into the system to cut down on
errors and save time. However, I'm not sure if this is doable. Is it
possible with PHP to have a page up and then scan the article, and have
the bar code passed to the script so it can query the database and bring
up the item on the page? I know the script has to be called by
something, but I'm not sure exactly what could be used.
Thanks.
Steve
Yes, it is possible. A bar code scanner is just a glorified keyboard.
Anywhere you can type data in, you can scan a bar code and the date will
show up just like it was typed. One caveat - make sure you get a scanner
that has built in decoding - meaning it translates what is scanned into
useable data.
Now, if you want to scan and have something automatically happen...
Most bar code scanners allow you to program (usually by scanning a special
bar code that is in the manual) a "post-amble" character. You would set
this to a LF/CR (Enter). Then when you scanned on the field the data would
be entered and prepended with an Enter. The default button on the form
should be the submit button.
So you would scan the value, the data would be entered and the "submit form"
button selected would be processed and the data would be passed to your form
(php script) to do whatever you needed to do with it.
Note: You can also set your post-amble character to be a "tab" so it will
go to the next field instead of the enter key.
Hope that helps...