Thank You! Please find the status of this certificate below:
<?php
// Ensure that you use the correct table name and WordPress database connection.
global $wpdb;
// Get the certificate ID from the URL (e.g., ?certificate_id=ABC123)
$certificate_id = $_GET['certificate_id'];
// Query the database to fetch certificate details
$results = $wpdb->get_results(
$wpdb->prepare("SELECT * FROM {$wpdb->prefix}certificates WHERE CertificateID = %s", $certificate_id)
);
if ($results) {
foreach ($results as $certificate) {
echo '<h2>Certificate Details</h2>';
echo '<p><strong>Holder Name:</strong> ' . esc_html($certificate->HolderName) . '</p>';
echo '<p><strong>Institution Name:</strong> ' . esc_html($certificate->InstitutionName) . '</p>';
echo '<p><strong>Issue Date:</strong> ' . esc_html($certificate->IssueDate) . '</p>';
echo '<p><strong>Status:</strong> ' . esc_html($certificate->Status) . '</p>';
}
} else {
echo '<p>Certificate not found or invalid ID.</p>';
}
?>