* @copyright Copyright (c) 2020-2021 * @license https://opensource.org/licenses/MIT MIT License * @link https://github.com/giandonatoinverso/PHP-Dynamic-Qr-code * @version 1.0 */ session_start(); require_once 'config/config.php'; require_once BASE_PATH.'/includes/auth_validate.php'; // Dynamic qrcode class require_once BASE_PATH . '/lib/Dynamic_Qrcode/Dynamic_Qrcode.php'; $dynamic_qrcode = new Dynamic_Qrcode(); $dynamic_id = htmlspecialchars($_GET['dynamic_id'], ENT_QUOTES, 'UTF-8'); $operation = htmlspecialchars($_GET['operation'], ENT_QUOTES, 'UTF-8'); ($operation == 'edit') ? $edit = true : $edit = false; $db = getDbInstance(); // Handle update request. As the form's action attribute is set to the same script, but 'POST' method, if ($_SERVER['REQUEST_METHOD'] === 'POST') $dynamic_qrcode->edit(); // If edit variable is set, we are performing the update operation. if ($edit) { $db->where('id', $dynamic_id); // Get data to pre-populate the form. $dynamic_qrcode = $db->getOne('dynamic_qrcodes'); } ?> Edit dynamic - Qrcode Generator

Edit Qr codes

Enter the requested data