setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); // Query the database $stmt = $conn->prepare("SELECT * FROM `scc24`"); $stmt->execute(); $content = $stmt->fetch(PDO::FETCH_ASSOC); // Check and render content if ($content && isset($content['content']) && $content['content']) { echo '

' . htmlspecialchars($content['title']) . '

' . $content['content'] . '
'; } else { echo '

Content not found (404).

'; } } catch (PDOException $e) { echo "

Error: " . htmlspecialchars($e->getMessage()) . "

"; } ?>