What is the process for PHP to generate the barcode and then fetch the data?

Source: Internet
Author: User
I want to show a student's details after the barcode scanner is swept

My idea is to add a barcode field to the database, and every time you add a student, a random, non-repeating bar code with 9 digits is added to the database together with the student information, and then when the scanner scans, the barcode number is placed in text for SQL search (like the scanner and keyboard input?). ), from the database search to the bar code numbers to get peer student information to display.

May I ask how this works? Is there any better way?


Reply to discussion (solution)

Generate two-dimensional code with JavaScript on the line, scanner and keyboard input almost, the cursor in the input box when the scan will automatically fill the information into the input box

JavaScript generates two-dimensional code
jquery Draw Barcodes

Using the user ID as the barcode content, after scanning to obtain the user ID and then call the API to obtain user data.

Barcode generation See the example above.

Bar code content with the number on the line, do not add additional fields

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.