setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $stmt = $db->prepare("SELECT * FROM md5_data WHERE md5 = :md5"); $stmt->bindParam(':md5', $_POST["md5-hash"]); $stmt->execute(); $result = $stmt->fetch(PDO::FETCH_ASSOC); if ($result) { echo '

Given MD5 Vlue:

'; echo ' '; } else { echo '

No data found for the given MD5 hash

'; echo ' ' ; // echo json_encode(array('success' => false, 'message' => 'No data found for the given MD5 hash')); } exit(); } catch (PDOException $e) { echo json_encode(array('success' => false, 'message' => 'Database error: ' . $e->getMessage())); exit(); } } ?>

MD5 Decryption