Search code examples
htmljquery-pluginssmartphone

scan a barcode with smartphone camera from a web page


I would like to scan a barcode with smartphone camera from a web page here is the link. the problem is how can I store a scanned text from this link in inputbox from the webpage?

http://example.azurewebsites.net/desc.html?code={CODE}">Scan


Solution

  • You will want to use PHP for this problem. Your variable is code so in PHP you would do something like this:

    $code = $_GET['code'];
    

    to display it in your input box just simply add the value attribute:

    <input type="text" value="<?php echo $_GET['code']; ?>">