Koneksi Scan Barcode Dengan Php Mysql
I am trying to set up a library for books in my work place. I have the MySQL database set up, with the data and everything. Now what i am trying to do is have the ability for someone to take their phone, scan a QR code for a certain book, and it would check out the book. I have a field in the database that states if the book was checked out, and another stating check out date. How would i access my database externally through the internet and QR codes, and have the QR code change data in specific fields of my database, thanks. I used phpMyAdmin to set up the database, and my webhost is iPage.com.
Salah satu cara koneksi dari aplikasi android ke php dan mysql adalah dengan. Next Post Koneksi dari android ke php dan mysql. Data Barcode; Delphi.
- Aplikasi Sistem Inventory Barang Menggunakan Barcode Scanner Berbasis Web dengan PHP. Aplikasi Absensi Dengan Koneksi Realtime Mesin. Dengan PHP dan MySQL.
- Connect MySQL db to QR codes. Guy from the support of iPage.com told me that php is supported by your. Part you can use the ZXing Barcode Scanner app.
2 Answers
As I already noted in a comment you question is simplar to the question Tranfer QR Code Into a MySql Database. But in your question are more points unclear: So far I did some research some guy from the support of iPage.com told me that php is supported by your webhoster in all packages.
So I will give your some hints how you can implement that with php:
For the database access use prepared statements and PDO. Here is a good tutorial about PDO.
For clean and simple urls for some kind of REST API use mod_rewrite with .htaccess:
Basically you have to check if mod rewrite is enabled. In your case you can skip this, but in general you have to check if you have a AllowOverride All
statment in your directory directive.
Just put this code in your .htaccess file:
So you can access the qr code in yourphpfile.php
with this simple variable access:
For the scanning part you can use the ZXing Barcode Scanner app:
If the user has the ZXing installed the brower will open the app automatically. If not the user will get a simple site which gives him or her a hint how to install the app.
You just have to link to the page the resulting value of the qr code will be submitted to the url http://example.com/seachbook/QR-code-content.
See also the full explanation on the ZXing documentation.
Membuat Barcode Dengan Php
In general that certainly is possible. Actually every QRCode / barcode stores information. But usually the size of that information is pretty small. Typically only references like URLs or numbers (IDs) are stored and the 'real' data is retrieved from a database using those references. But strictly speaking that is a form of storing information in a QRCode / barcode.
Looking closely we see that the data is stored in the code itself, not inside a database if we are talking about that small amount of data. Certainly that data can be stored inside a database when the code is read, all you need is a trivial piece of software. But that makes little sense in most cases, since the data already is stored. If you want to use a database to combine data from different sources, so if you only want to use codes as a means of transport, then reading the codes is just a replacement for typing the information in with a keyboard. So no magic here, nothing code specific you have to consider.
here is the php script to generate QR directly in db