Exemple #1
0
<?php

require_once "../config_global.php";
$database = "if15_teamalpha_3";
require_once "edit.class.php";
require_once "header.php";
require_once "footer.php";
//if(!isset($_SESSION["logged_in_user_id"])){
//	header("Location: login.php");
//}
$Edit = new Edit($mysqli);
$office = $_GET["office"];
$packet_id = $_GET["edit_id"];
$packet_array = $Edit->getPacketData($packet_id);
if (isset($_POST["update_packet"])) {
    $Edit->updatePacket($office, $_POST["arrival"], $_POST["departure"], $_POST["fromc"], $_POST["comment"], $_POST["office_id"], $packet_id);
    header("Location: dataWorker.php");
}
?>

<h2>Muuda saadetise andmeid</h2>
<form method="post">
		
		<label for ="arrival">Saabumisaeg</label><br>
		<input id="arrival" name="arrival" type="text" value="<?php 
echo $packet_array[0]->arrival;
?>
"> <br><br>
		
		<label for ="arrival">Väljumisaeg</label><br>
		<input id="departure" name="departure" type="text" value="<?php