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%
%PLEAZE_NO_CACHE%
$navbar="boards";
$id=$_GET['id'];
?>
<!DOCTYPE html>
<html>
@ -23,7 +24,7 @@ $navbar="boards";
$error_message = "";
if (!$error) {
$statement = $pdo->prepare("SELECT * FROM boards WHERE id=:id");
$statement->execute(array("id"=>$_GET['id']));
$statement->execute(array("id"=>$id));
$result = $statement->fetch();
echo $result['name'];
}
@ -34,7 +35,9 @@ $navbar="boards";
</center></h1>
</div>
<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">
</div>
</div>