-
Notifications
You must be signed in to change notification settings - Fork 2
/
updateform.php
93 lines (78 loc) · 2.74 KB
/
updateform.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<!DOCTYPE html>
<html lang="en">
<head>
<title>Update data</title>
<meta name="description" content="">
<meta name="author" content="">
</head>
<body>
<?php include_once("header.php");?>
<div class="container">
<div class="text-center">
<h1>Marine</h1>
<p class="lead">Choose data to update</p>
</div>
<b>Station data</b>
<br>
<form action="stationlist.php" method="post">
Choose station:
<select class="selectpicker" multiple data-actions-box="false" name = station_list[]>
<?php
include 'db.php'; //establish database connection script
$result = $conn->query("SELECT Sname from Stations");
while($row = $result->fetch_assoc()) {
$station = htmlentities($row['Sname']);
print "<option deselected name =\"station_list[] \" value = \"" . $station . "\">" . $station . "</option>";
}
include 'closeDB.php'; //close database connection script
?>
<input type="hidden" name = "table" value = "station">
</select>
<br>
<input type="submit" name="submit" Value="Submit"/>
</form>
<br>
<br>
<b>Physical data</b>
<br>
<br>
<form action="datalist.php" method="post">
Choose station: <select class="selectpicker" multiple data-actions-box="false" name = station_forphysical[] id="station">
<?php
include 'db.php'; //establish database connection script
$result = $conn->query("SELECT DISTINCT(Pstationname) AS Pstationname FROM Physical ORDER BY Pstationname");
while($row = $result->fetch_assoc()) {
$station = htmlentities($row['Pstationname']);
print "<option deselected name =\"station_forphysical[] \" value = \"" . $station . "\">" . $station . "</option>";
}
include 'closeDB.php'; //close database connection script
?>
<input type="hidden" name = "table" value = "physical">
</select>
<br>
<input type="submit" name="submit" Value="Submit"/>
</form>
<br>
<br>
<b>Biological variables:</b>
<br>
<br>
<form action="datalist2.php" method="post">
Choose station: <select class="selectpicker" multiple data-actions-box="false" name = station_forbiological[]>
<?php
include 'db.php'; //establish database connection script
$result = $conn->query("SELECT DISTINCT Bstationname FROM Biological ORDER BY Bstationname");
while($row = $result->fetch_assoc()) {
$station = htmlentities($row['Bstationname']);
print "<option deselected name =\"station_forbiological[] \" value = \"" . $station . "\">" . $station . "</option>";
}
include 'closeDB.php'; //close database connection script
?>
<input type="hidden" name = "table" value = "biological">
</select>
<br>
<input type="submit" name="submit" Value="Submit"/>
</form>
</div><!-- /.container -->
</body>
</html>