itskp-odense/Frontend/edit.php

28 lines
680 B
PHP

<?php
require "../Backend/controller/accessControl.php";
require "../bootstrap.php";
use Backend\Model\Post;
$id = $_GET['id'];
$data = Post::query()->find($id);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Home</title>
</head>
<body>
<form action="../Backend/controller/update.php" method="POST">
<input type="number" name="id" hidden value="<?php echo $id ?>">
<input type="text" name="upTitle" placeholder="Title" value="<?php echo $data->title ?>">
<input type="text" name="upDescription" placeholder="Description" value="<?php echo $data->description; ?>">
<input type="submit" name="update">
</form>
</body>
</html>