How to Generate Barcode Using PHP

This PHP Barcode Generator is a server-side PHP script that generates and displays dynamic barcode data that can be integrated into any web application. PHP barcodes generate very small images about 2KB, miniscule in comparison to the size of standard JPG or GIF barcode images. You may also like How to Generate QR Code Using PHP And HTML.

To generate barcode you have to download PHP – Barcode library.


        <form method="post" action="">
            <input type="text" name="barcode_text">
            <input type="submit" name="generate_barcode" value="GENERATE">

PHP Code

    echo "<img alt='testing' src='barcode/barcode.php?codetype=Code39&size=40&text=".$text."&print=true'/>";

Leave a Reply

Your email address will not be published. Required fields are marked *