Ejemplo n.º 1
0
<?php

require_once "functions2.php";
if (isset($_POST["save"])) {
    updateveod($_POST["id"], $_POST["autonr"], $_POST["juht"]);
}
$veod_array = getveodData();
?>

<html>
<link>
<body><h2>Tabel</h2>

<table border="1">
	<tr>
		<th>id</th>
		<th>algus</th>
		<th>ots</th>
		<th>aeg</th>
		<th>autonr</th>
		<th>juht</th>
		<th>edit</th>
		
	</tr>
	
</body>
</html>
	<?php 
//trükime välja read
//
for ($i = 0; $i < count($veod_array); $i++) {
Ejemplo n.º 2
0
<?php

require_once "edit_functions.php";
$autonr = "";
$juht = "";
if (isset($_POST["updateveod"])) {
    //vajutas salvesta nuppu
    updateveod($_GET["id"], $_POST["algus"], $_POST["ots"], $_GET["aeg"], $_POST["autonr"], $_POST["juht"]);
}
?>

<h2>Lisa oma veotellimus</h2>
<form action="<?php 
echo htmlspecialchars($_SERVER["PHP_SELF"]);
?>
" method="post">
	<input type="hidden" name="id" value="<?php 
echo $_GET["edit_id"];
?>
"
	<label for= "algus" >Algus</label><br>
	<input id="algus" name= "algus" type="text" value="<?php 
echo $algus->algus;
?>
"><br><br>
	<label for="ots">Ots</label><br>
	<input id="ots" name="ots" type="text" value="<?php 
echo $ots->ots;
?>
"><br><br>
	<label for="aeg">Aeg</label><br>