Basic PHP Qns

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
fofusion
Forum Newbie
Posts: 2
Joined: Sun Aug 22, 2010 3:48 pm

Basic PHP Qns

Post by fofusion »

Hi guys

I'm hoping someone can help me out with some rather basic php...

It's a complete n00b question I know but I've spent the last 30 minutes or so trying to find what I want on google but have had no luck finding exactly what I want.

Basically I'm trying to make a simple web app which will track products serial numbers as we sell them. I've created a MySQL database with 5 Tables (Administrators, Products, Requests, Staff, Users).

Administrators - people who can add/remove products from the 'Products' table
Products - a list of products using the UPC (barcode)
Requests - where all the information will get scanned in (product being sold, who it was sold by, serial number of product sold etc)
Staff - just a simple list of staff who requested the product which is used to populate information in the Requests table
Users - users who will gain access to the system to add requests for each sale

My basic plan is to scan the products barcode and have it autocomplete information such as the part number and product description on the requests page. At present we're using drop downs in MS Access and for staff members we're typing their name in which is resulting in a lot of inconsistency which my undiagnosed OCD doesn't like ;)

At the moment all I've really got is the database set up and am just looking for help setting up the auto-completion part.

Any advice is hugely appreciated :)

Thanks
Gargoyle
Forum Contributor
Posts: 130
Joined: Wed Jul 14, 2010 12:25 am

Re: Basic PHP Qns

Post by Gargoyle »

well, you need at least one barcode scanner. the professional ones usually allow you to configure an interface in a way so that the scanner can at least put its data into a file in a certain directory. from there, you can read it with PHP.

this is the usual approach because PHP was not intended for direct, persistent network communication (even though you can make it work).
User avatar
yacahuma
Forum Regular
Posts: 870
Joined: Sun Jul 01, 2007 7:11 am

Re: Basic PHP Qns

Post by yacahuma »

the scanner part is separte from yoiur application , right?

For autocomplete, look at something called jquery. That will be the easiest thing.
fofusion
Forum Newbie
Posts: 2
Joined: Sun Aug 22, 2010 3:48 pm

Re: Basic PHP Qns

Post by fofusion »

Hi guys thanks for the response :)

We already have a barcode scanner.. At the moment it automatically presses enter once an item has been scanned but I can quite easily reconfigure this.

My problem is that anything I find relating to jQuery is to autosuggest and complete the box that I entered the UPC in.. Ideally I want to have 2 pieces of text appear (part number and description. However not as text boxes - as I don't want these to be editable).

Thanks
Post Reply