-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsurveyschool.php
121 lines (114 loc) · 3.21 KB
/
surveyschool.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<?php
session_start();
include("header.php");
include("connection.php");
if($_POST["institutetype"] == "Primary school")
{
header("Location: survey.php?yr=$_POST[surveyyear]");
}
else if($_POST["institutetype"] == "High school")
{
header("Location: highsurvey.php?yr=$_POST[surveyyear]");
}
else if($_POST["institutetype"] == "PUC")
{
header("Location: pusurvey.php?yr=$_POST[surveyyear]");
}
?>
<div id="main">
<div id="content" class="left">
<div class="highlight">
<h3>View institution</h3>
<form id="form1" name="form1" method="post" action="">
<p>
<label for="institutetype">Institute Type</label>
<select name="institutetype" id="institutetype">
<option value="Primary school"<?php
if($_POST[institutetype] == "Primary school")
{
echo "selected";
}
?> >Primary school</option>
<option value="High school"<?php
if($_POST[institutetype] == "High school")
{
echo " selected";
}
?>>High school</option>
<option value="PUC"<?php
if($_POST[institutetype] == "PUC")
{
echo " selected";
}
?>>PUC</option>
</select>
<?php
$yr = date(Y);
?>
<input type="hidden" value="<?php echo $yr; ?>" id="surveyyear" name="surveyyear" />
<input type="submit" name="button" id="button" value="Submit" />
</p>
</form><br />
<form id="form1" name="form1" method="post" action="">
<h3>Year wise survey report</h3>
<p>Survey Year
<?php
$resultyear = mysqli_query($con,"SELECT DISTINCT year FROM survey");
?>
<select name="surveyyear" id="surveyyear">
<?php
while($rowrec = mysqli_fetch_array($resultyear))
{
echo "<option value='$rowrec[0]'>$rowrec[0]</option>";
}
?>
</select>
</p>
<p>
<label for="institutetype2">Institute Type</label>
<select name="institutetype" id="institutetype">
<option value="Primary school"<?php
if($_POST[institutetype] == "Primary school")
{
echo "selected";
}
?> >Primary school</option>
<option value="High school"<?php
if($_POST[institutetype] == "High school")
{
echo " selected";
}
?>>High school</option>
<option value="PUC"<?php
if($_POST[institutetype] == "PUC")
{
echo " selected";
}
?>>PUC</option>
</select>
</p>
<p>
<input type="submit" name="button" id="button" value="View survey" />
</p>
</form>
<p> </p>
</div>
<div class="projects">
<div class="item"></div>
<div class="item">
<div class="cl"> </div>
</div>
</div>
</div>
<?php
include("sidebar.php");
?>
<div class="cl"> </div>
</div>
<div class="shadow-l"></div>
<div class="shadow-r"></div>
<div class="shadow-b"></div>
</div>
<?php
include("footer.php");
?>