-
Notifications
You must be signed in to change notification settings - Fork 0
/
data_procedure.php
73 lines (71 loc) · 2.48 KB
/
data_procedure.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?php
session_start();
$animal_name= $_SESSION['animal_name'];
$owner_vat= $_SESSION['owner_vat'];
$date_timestamp = $_REQUEST['date_timestamp'];
$_SESSION['date_timestamp']= $date_timestamp;
?>
<html>
<head>
<title> Data Procedure </title>
</head>
<body>
<font face = "verdana" size = "8">
<center>
<form action="register_procedure.php" method="POST">
<img src="logo.png" alt="logo" style="width:200px;height:200px;">
<p> <b> <font size="5"> Procedure Form </font></b> </p>
<table>
<?php
echo("<tr><td>Animal Name</td><td>$animal_name</td></tr>");
echo("<tr><td>VAT owner</td><td>$owner_vat</td></tr>");
?>
<tr><td>VAT Assistant</td> <td>
<select name="vat_ass">
<?php
require("connection.php");
$stmt = $connection->prepare("SELECT vat FROM assistant ORDER BY vat;");
if ($stmt == FALSE)
{
$info = $connection->errorInfo();
echo("<p>Error: {$info[2]}</p>");
exit();
}
$stmt->execute();
$result = $stmt->fetchAll();
foreach($result as $row)
{
$vat = $row[vat];
echo("<option value=\"$vat\">$vat</option>");
}
?>
</select>
</td></tr>
<tr><td> Indicator Value </td><td><input type="number" name="value" required/></td></tr>
<tr><td> Indicator name</td> <td>
<select name="indicator">
<?php
$stmt = $connection->prepare("SELECT * FROM indicator WHERE type_indicator=1 ORDER BY name;");
if ($stmt == FALSE)
{
$info = $connection->errorInfo();
echo("<p>Error: {$info[2]}</p>");
exit();
}
$stmt->execute();
$result = $stmt->fetchAll();
foreach($result as $row)
{
echo("<option value=\"$row[name]\">$row[name] - $row[units] </option>");
}
$connection = null;
?>
</select>
</td></tr>
</table>
<p><input type="submit"/></p>
</form>
</center>
</font>
</body>
</html>