| Server IP : 172.64.80.1 / Your IP : 172.71.120.95 Web Server : Apache System : Linux mail.federalpolyede.edu.ng 5.10.0-32-amd64 #1 SMP Debian 5.10.223-1 (2024-08-10) x86_64 User : federalpolyede.edu.ng_idh35skikv ( 10000) PHP Version : 7.4.33 Disable Function : opcache_get_status MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/vhosts/federalpolyede.edu.ng/httpdocs_backup/admin_student/qr/ |
Upload File : |
<?php
/*
require_once("phpqrcode/qrlib.php");
$item = "ID 23456";
QRcode::png($item);
*/
?>
///////////////
<div class="content">
<div class="col-lg-12">
<div class="panel panel-primary">
<div class="panel-heading">Enter information to generate QR Code</div>
<div class="panel-body">
<div class="input_field_wrapper">
<div>
<form method="post">
<input type="text" name="item_id" value="" required />
<input type="submit" class=" btn btn-primary" value="Generate QR Code" style=" margin:5px;">
</form>
</div>
</div>
</div></div></div>
<div class="col-lg-12">
<?php
//load the ar library
include 'qrlib.php';
if(isset($_POST['item_id'])){
//data to be stored in qr
$item =$_POST['item_id'];
//file path
$file = "images/qr1.png";
//other parameters
$ecc = 'H';
$pixel_size = 20;
$frame_size = 5;
// Generates QR Code and Save as PNG
QRcode::png($item, $file, $ecc, $pixel_size, $frame_size);
// Displaying the stored QR code if you want
echo "<div><h3>Generated QR Code for {".$item."} </h3><br><img src='".$file."' width='150'></div>";
}
?>
</div>
</div>