By using this template we will generate certificate for each student by using their data from MySQL student table. We will generate QR code by using student ID and add it to Certificate (Image).
Select one student from the list below and generate its certificate.
Generating certificates using student photo QR code & logo with data from MySQL table using PHP GD
require "config-pdo.php"; // database connection
$id=$_GET['id']; // receive the id value from selection
$sql="SELECT * FROM student where id=:id";
$count=$dbo->prepare($sql);
$count->bindParam(":id",$id,PDO::PARAM_INT,2);
if($count->execute()){
$row = $count->fetch(PDO::FETCH_OBJ);
// Full code to create image with QR code.
}
How to generate QR code as Image
We will be using google chart api to generate QR code.
Use the same instructions given at above link to install the script and use the main file gd-certificate.php file to check the generated certificate for student id = 4.
Post your questions or suggestions here or at Youtube …
QR code in PDF documents, invoices
Every invoice will have one unique ID. This ID is used to link to other details like address of buyer, address of seller, invoice details , location details and other tracking codes. By using this unique ID, one QR code is generated and the same is embedded in the printed invoice or over the packing box.