built the edit function

This commit is contained in:
Ismail Cadaroski 2017-02-16 19:39:49 +01:00
parent ff8164c026
commit 5114ee9910
1 changed files with 56 additions and 0 deletions

56
editboard.php Normal file
View File

@ -0,0 +1,56 @@
<?php
include 'functions.php';
date_default_timezone_set('Europe/Amsterdam');
?>
<!DOCTYPE html>
<html>
<head>
<!-- enable utf-8 encoding for umlauts etc.-->
<meta charset="utf-8">
<!-- Description of what this dose -->
<meta name ="viewport" content="width=device-width, initial-scale=1">
<!-- link to the default css file -->
<link rel="stylesheet" href="css/stylesheet.css"/>
</head>
<body>
<div>
<div>
<header>
<!-- The title begins here -->
<h1>Edit</h1>
<!-- The title ends here -->
<!-- The sidebar naviagtion begins here -->
<nav>
<?php
include 'navigation.php';
?>
</nav>
<!-- The sidebar naviagtion ends here -->
</header>
</div>
<!-- Edit function begins here -->
<h2>Edit Board</h2>
<?php
$userId = $_POST['userId'];
$demandId = $_POST['demandId'];
$piecesMax = $_POST['piecesMax'];
$piecesMin = $_POST['piecesMin'];
$date = $_POST['date'];
$text = $_POST['text'];
echo
"<form method='POST' action='".editpost($con)."'>
<input type='hidden' name='userId' value='".$userId."'>
<input type='number' name='piecesMax' value='".$piecesMax."'>
<input type='number' name='piecesMin' value='".$piecesMin."'>
<input type='hidden' name='date' value='".$date."'>
<textarea name='text'>".$text."</textarea><br />
<button type='submit' name='edit'>Edit</button>
</form>";
?>
</div>
</body>
</html>