Example #1
0
<?php 
require_once "functions.php";
require_once "Table.class.php";
$Table = new Table($mysqli);
//kasutaja muudab andmeid
if (isset($_GET["update"])) {
    $Table->updateCarData($_GET["car_id"], $_GET["number_plate"], $_GET["mark"], $_GET["year"], $_GET["person_id"]);
}
$car_array = getAllData();
$keyword = "";
if (isset($_GET["keyword"])) {
    $keyword = $_GET["keyword"];
    //otsime
    $contest_array = getAllData($keyword);
} else {
    //näitame kõik tulemused
    $contest_array = getAllData();
}
?>

<h1>Tabel</h1>
<table border=1>
<tr>
    <th>id</th>
    <th>Kasutaja id</th>
    <th>Auto numbri märk</th>
    <th>Mark</th>
    <th>Väljalaskeaasta</th>
	<th>Isikukood</th>
    <th>Muuda</th>
</tr>