Repository navigation
Expand file tree
/
Copy pathindex.php
More file actions
59 lines (56 loc) · 1.99 KB
/
Copy pathindex.php
File metadata and controls
59 lines (56 loc) · 1.99 KB
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
<?php
include_once "conn.php";
session_start();
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>SIBD - Veterinary Hospital</title>
</head>
<body>
<form login method="GET" action="query1.php">
<label for="VAT">Client VAT*:</label>
<select id="VAT" name="VAT">
<!--<option selected="selected">Client VAT:</option>-->
<?php
try{
$sql = 'select VAT from client;';
$result = $conn->query($sql);
foreach($result as $row) {
$code = $row["VAT"];
?>
<option name="VAT" value="<?php echo($code); ?>"><?php echo $code; ?></option>
<?php
}
}catch(PDOException $e){
echo("ERROR Couldnt access client." . $e->getMessage());
echo('<br>');
}
?>
</select>
<label for="animalName">Animal name*:</label>
<input type="text" id="animalName" name="animalName">
<label for="animalOwner">Owner name*:</label>
<input type="text" name="animalOwner" id="animalOwner">
<input type="submit" name="query1" value="Check">
<p> * - Required fields </p>
</form>
<br>
<form login method="POST" action="consultNumber.php">
<label for="animalName">Animal name*:</label>
<input type="text" name="animalName" id="animalName">
<label for="ownerName"> Owner Name*:</label>
<input type="text" name="ownerName" id="ownerName">
<label for="year">Year*:</label>
<input type="text" name="year" id="year">
<input type="submit" value="Number of consults">
<p> * - Required fields </p>
</form>
</body>
</html>