-
Notifications
You must be signed in to change notification settings - Fork 0
/
pref.php
120 lines (100 loc) · 3.66 KB
/
pref.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
<?php
include 'connection.php';
$query ="select * from company_list;";
$result=mysqli_query($dbc,$query) or die("error1");
$limit=mysqli_num_rows($result);
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Preferences</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Student Profile</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css">
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>
<!-- Popper JS -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
<!-- Latest compiled JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js"></script>
<!-- CSS for this page -->
<link rel="stylesheet" href="assets/css/pref.css">
<!-- JQuery for this page -->
<!-- <script src="assets/js/pref.js"> </script> -->
</head>
<body>
<div class="container-fluid mb-2 mt-2">
<div class="row">
<div class="col-md-3">
<img class=" logo" src="assets/img/logo.png" alt="Presidency Logo">
</div>
<div class="col-md-6 text-center ">
<h3>Presidency University,Bengaluru</h3>
<h4>School of Engineering</h4>
<h4>Industrial Practice Division</h4>
</div>
</div>
</div>
<!-- Navigation -->
<nav class="navbar navbar-expand-lg navbar-dark sticky-top">
<div class="container">
<a class="navbar-brand" href="">Presidency University</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
<span class="navbar-text text-light">
</span>
<li class="nav-item active">
<a class="nav-link" href="sp.php">Home
<span class="sr-only">(current)</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="logout.php">Logout
</a>
</li>
</ul>
</div>
</div>
</nav>
<div class="container">
<form class="" action="pref_submit.php" method="post">
<table class="table text-center pre-scrollable">
<thead>
<tr>
<th>Sl No.</th>
<th>Company Name</th>
<th>Preference No.</th>
</tr>
</thead>
<tbody>
<!-- Loop to display company name -->
<?php for ($i=1; $i<= $limit; $i++) {
$row=mysqli_fetch_array($result);?>
<tr>
<input type="hidden" name="<?php echo 'cid'.$i ?>" value="<?php echo $row['sl_no'] ?>">
<td><?php echo $i ?></td>
<td><?php echo $row['cmp_name'] ?></td>
<td>
<select name="<?php echo 'select'.$i ?>">
<option value="0">select</option>
<!-- Loop to display dropdown -->
<?php for ($j=1; $j<= $limit; $j++) { ?>
<option value="<?php echo $j ?>"><?php echo $j ?></option>
<?php } ?>
</select>
</td>
</tr>
<?php } ?>
</tbody>
</table>
<input type="submit" name="" value="Submit">
</form>
<!-- <button type="button" class="btn">Reset All</button> -->
</div>
</body>
</html>