<?php
//https://webmobtuts.com/backend-development/generating-and-scanning-qrcodes-with-php/
include('phpqrcode/qrlib.php');

$id = $_GET['id'];
$name =$_GET['name'];
$code = $name." REG NO: $id";
QRcode::png($code);


//Store it as an Image
// $id = $_GET['id'];
// $code = "DWK$id";
// $fileName = md5(rand()).'.png'; 
// $tempDir = "files";                    // the directory to store the files
// $filePath = $tempDir . "/" . $fileName;
// QRcode::png($code, $filePath,QR_ECLEVEL_H, 4);         // note the second parameter
// if(file_exists($filePath)) {
//     echo '<img src="./'.$filePath.'" />'; 
// }

?>