setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $stmt = $conn->prepare("UPDATE scc24 SET `type` = :type, `title` = :title, `slug` = :slug, `content` = :content WHERE `id` = :getID"); $stmt->bindParam(':getID', $getID); $stmt->bindParam(':type', $_POST['type']); $stmt->bindParam(':title', $_POST['title']); $stmt->bindParam(':slug', $_POST['slug']); $stmt->bindParam(':content', $_POST['content']); $stmt->execute(); // echo ""; } catch (PDOException $e) { echo "Err: " . $e->getMessage(); } } ?> setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $stmt = $db->prepare("SELECT * FROM scc24 WHERE `id` = :id"); $stmt->bindParam(':id', $getID); $stmt->execute(); $rows = $stmt->fetchAll(PDO::FETCH_ASSOC); foreach($rows as $row){ echo '

Edit New Page or Notice

'; ?>
Page Title:

'; echo ''; }; // exit(); } catch (PDOException $e) { echo json_encode(array('success' => false, 'message' => 'Database error: ' . $e->getMessage())); } ?>