v0.0.9c Small changes
This commit is contained in:
+8
-5
@@ -1,6 +1,9 @@
|
||||
<?php
|
||||
require "../Backend/controller/accessControl.php";
|
||||
//require "../Backend/controller/edit.php";//Bootstrap is require via this file
|
||||
require "../bootstrap.php";
|
||||
use Backend\Model\Post;
|
||||
$id = $_GET['id'];
|
||||
$data = Post::query()->find($id);
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
@@ -9,12 +12,12 @@ require "../Backend/controller/accessControl.php";
|
||||
<title>Home</title>
|
||||
</head>
|
||||
<body>
|
||||
<?php $ad = $_GET['id']; ?>
|
||||
|
||||
|
||||
<form action="../Backend/controller/update.php" method="POST">
|
||||
<input type="number" name="id" hidden value="<?php echo $ad ?>">
|
||||
<input type="text" name="upTitle" placeholder="Title">
|
||||
<input type="text" name="upDescription" placeholder="Description">
|
||||
<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>
|
||||
|
||||
|
||||
+1
-2
@@ -33,11 +33,10 @@ use Backend\Model\Post;
|
||||
<a href="../Backend/controller/logout.php">Log ud</a>
|
||||
<hr>
|
||||
<p>Opret post</p>
|
||||
<!--<form action="../Backend/controller/upload.php" method="POST">-->
|
||||
<!--We use ajax to send the code to the backend-->
|
||||
<input type="text" id="title" name="title" maxlength="255">
|
||||
<input type="text" id="description" name="description" maxlength="2000">
|
||||
<button id="submit" name="createPost">Opret opslag</button>
|
||||
<!-- </form>-->
|
||||
<hr>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user