Reading Bar Code Scanner

This is a discussion on Reading Bar Code Scanner within the PHP Language forums, part of the PHP Programming Forums category; I will be starting to work on an e-commerce web site pretty soon, and one thing the user would ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-17-2004
Steve
 
Posts: n/a
Default Reading Bar Code Scanner

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
Reply With Quote
  #2 (permalink)  
Old 10-17-2004
Phillip T. Murphy
 
Posts: n/a
Default Re: Reading Bar Code Scanner


"Steve" <racquetballer@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...


Reply With Quote
  #3 (permalink)  
Old 10-18-2004
Ed Jones
 
Posts: n/a
Default Re: Reading Bar Code Scanner

Steve wrote:
> 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.


Just in case you're forging ahead under a misconception, barcodes don't
actually store information about the product they're on. They simply
contain numbers (or sometimes alphanumeric characters, in the case of
Code 39 for example) which refer to product details already stored in a
database of some sort. This means that you're not going to have a magic
time-saving solution to putting information into the system in the first
place.

Apologies if that's obvious!

I've used barcodes in a small library system written in PHP, and printed
them using FPDF - available at http://www.fpdf.org. There are some neat
extension classes to create labels, too.

For actually creating barcodes in PHP, you might want to have a look at:

http://www.mribti.com/barcode/

http://www.ashberg.de/php-barcode/

Ed

Reply With Quote
  #4 (permalink)  
Old 10-19-2004
john.postlethwait@gmail.com
 
Posts: n/a
Default Re: Reading Bar Code Scanner

It really depends on the barcode... A lot of times the numbers are
codes for categories... For insatnce the number (alphanumeric and
integers) could translate into other meanings.

Just for example of what I am talking about at my work we use barcodes
to find information, the bar code is written in such a way that you can
find the day, year, and unique number for the piece of information you
are looking for.

We use Julian dates where I work (day of the year numerically), the
bar-coded numbers look like: 20042922-0122300, and what that translates
to is 2004 (year) 292 (the numeric date for today) 2 (a sorting number
we use to classify data) and then 0122300 (a unique number for the
information) but the bar codes can even be coded to mean anything.
EX: 11=large 12=small 13=medium 14=custom size, etc..

That is a bad example of how it may be, but what I am getting at is
that he may be able to develop a bar-code system that uses numeric
feilds to define attributes of whatever he is doing, and in that case
the PHP script would be able to translate those fields into useable
information which is then stored in the database, and would then save
him a bunch of time... Coding would take longer, but be better for the
customer by a long shot.

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 03:11 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0