diff --git a/board.php b/board.php index e9e166c..5b7790d 100644 --- a/board.php +++ b/board.php @@ -34,7 +34,7 @@ date_default_timezone_set('Europe/Amsterdam');

Open Requests

diff --git a/editboard.php b/editboard.php index 0673a23..c6530cc 100644 --- a/editboard.php +++ b/editboard.php @@ -38,16 +38,16 @@ date_default_timezone_set('Europe/Amsterdam'); $demandId = $_POST['demandId']; $piecesMax = $_POST['piecesMax']; $piecesMin = $_POST['piecesMin']; - $date = $_POST['date']; + $title= $_POST['title']; $text = $_POST['text']; echo "
+

Maximum

Minimum
-
Produktbeschreibung

diff --git a/functions.php b/functions.php index 103f8f5..b30e7a0 100644 --- a/functions.php +++ b/functions.php @@ -89,17 +89,15 @@ function pbinsert ($con) } // A function to insert the own posts from the database into the website -function pbget($con) +function get_post_titles($con) { global $con; $sql = "SELECT * FROM demands"; $result = mysqli_query($con, $sql); while ($row = $result->fetch_assoc()) { echo "

"; + echo "" . $row['demandTitle'] . "" . "
"; echo $row['date'] . "
"; - echo $row['demandText'] ."
" , "
Maximum
"; - echo $row['piecesMax'] ."
Minimum
"; - echo $row['piecesMin']; echo "

@@ -111,7 +109,7 @@ function pbget($con) - + @@ -128,12 +126,14 @@ function editpost($con) $demandId = $_POST['demandId']; $piecesMax = $_POST['piecesMax']; $piecesMin = $_POST['piecesMin']; + $title = $_POST['title']; $text = $_POST['text']; // Inserts Updates Database $sql = "UPDATE demands SET piecesMax='$piecesMax', piecesMin='$piecesMin', + demandTitle='$title', demandText='$text' WHERE demandId='$demandId'"; $result = mysqli_query($con, $sql) or die(mysqli_error($con));