-
Notifications
You must be signed in to change notification settings - Fork 1
/
surveyheader.php
49 lines (43 loc) · 1.15 KB
/
surveyheader.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
<?php
session_start();
$resschool1 = mysqli_query($con,"select * from user where s_emailid ='$_SESSION[loginid]'");
$row1 = mysqli_fetch_array($resschool1);
$instid =$row1[1];
$resschool2 = mysqli_query($con,"select * from survey where inst_id='$instid' AND status='Active'");
$row2 = mysqli_fetch_array($resschool2);
$contsurvey = mysqli_num_rows($resschool2);
$surveyno = $row2[0];
$instids = $row2[1];
$resschool3 = mysqli_query($con,"select * from institute where inst_id='$instid'");
$row3 = mysqli_fetch_array($resschool3);
$insttype = $row3[1];
function schoolname($instid)
{
//Display school records
$query = "SELECT * FROM institute";
$result = mysqli_query($con,$query);
if($_SESSION["logintype"] == "Admin")
{
?>
<select name="institutetype" id="institutetype">
<?php
while($row = mysqli_fetch_array($result))
{
echo "<option value='$row[inst_id]'>$row[inst_name]</option>";
}
?>
</select>
<?php
}
else
{
while($row1 = mysqli_fetch_array($result))
{
if($instid==$row1[inst_id])
{
echo "<b>$row1[inst_name]</b>";
}
}
}
}
?>