added button for posting

master
Erik 2020-03-06 10:27:57 +01:00
parent 4c6ee895f3
commit 6d68159727
1 changed files with 6 additions and 3 deletions

View File

@ -3,6 +3,7 @@ session_start();
%NO_CHEAP_SESSION_STEALING% %NO_CHEAP_SESSION_STEALING%
%PLEAZE_NO_CACHE% %PLEAZE_NO_CACHE%
$navbar="boards"; $navbar="boards";
$id=$_GET['id'];
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
@ -23,7 +24,7 @@ $navbar="boards";
$error_message = ""; $error_message = "";
if (!$error) { if (!$error) {
$statement = $pdo->prepare("SELECT * FROM boards WHERE id=:id"); $statement = $pdo->prepare("SELECT * FROM boards WHERE id=:id");
$statement->execute(array("id"=>$_GET['id'])); $statement->execute(array("id"=>$id));
$result = $statement->fetch(); $result = $statement->fetch();
echo $result['name']; echo $result['name'];
} }
@ -34,7 +35,9 @@ $navbar="boards";
</center></h1> </center></h1>
</div> </div>
<div class="item-2"> <div class="item-2">
<form action="%CONTENT_DIR%/boards/post.php?id=$_GET['id']" method="post"> <?php
echo "<form action='%CONTENT_DIR%/boards/post.php?id=$id' method='post'>";
?>
<input type="submit" value="Post something"> <input type="submit" value="Post something">
</div> </div>
</div> </div>