forked from Teamexe/Online_polling_app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathresult.php
64 lines (61 loc) · 1.31 KB
/
result.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
<?php
include("connection.php");
?>
<html>
<head>
<?php
include("script.php");
?>
<style>
.error {color: #FF0000;}
</style>
</head>
<body>
<div class='container-fluid'>
<?php
include("nav.php");
include("head.php");
echo"<br>
<div class='row'>
<div class='col-md-12'>
<div class='panel panel-primary min_h'>
<div class=well well-sm><h2>Result of the election conducted</h2></div>
<div class=row><div class='col-md-1'></div><div class='col-md-11'>";
$c1=$_REQUEST['name'];
$sq="select * from $c1.cand_signup";
$result = mysqli_query($con,$sq);
if($result)
{
$Data= Array();
$Data1= Array();
$k=mysqli_num_rows($result);
while ($rop = mysqli_fetch_array($result, MYSQLI_ASSOC))
{
$Data[] = $rop['candname'];
$Data1[] = $rop['candvote'];
}
echo "<div class='row'>
<div class='col-md-3'><h4><b>No. of votes of candidate</b></h4></div>
<div class='col-md-3'><h4><b>Name of candidate</b></h4></div></div>";
for($i=0;$i<$k;$i++)
{
echo "<div class='row'>
<div class='col-md-3'>$Data1[$i]</div>
<div class='col-md-3'>$Data[$i]</div>";
$kkk=$Data[$i];
$kk=$Data1[$i];
echo"</div>";
}
}
echo "</div></div><br>
</div>
</div>
</div>
<hr>";
include("footer.php");
echo "</div>";
?>
</div>
<script>
</body>
</html>