I have done something I think similar to what you are trying to do, maybe. Here's the way it worked:
The barcode reader and its software took care of scanning the barcode with a laser and converting those crazy bars into numbers.
The barcode reader ran Windows mobile and ran a version of Internet Explorer.
So the user would start Explorer, navigate to what really was just a regular php page with a form with fields like "barcode", etc. The user placed focus on the input field on the form where they want the barcode to be entered. The user could then scan the barcode and the software on the scanner took care of putting the numbers into the form.
On the PHP side there is nothing different than using regular old forms. The barcode scanning and interpretation is done on the scanner by the scanning software. Collecting the form info and storing it in the database is just as you would do normally with PHP. PHP doesn't know there even is a barcode scanner involved, so for testing you can just type numbers into the form.
You can even turn the barcode data (numeric string) back into a barcode using PHP. Maybe with Jpgraph? I don't remember what library I used.
The barcode reader used for this was a Motorola Symbol device (model 9090 I think).