-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgetcombos.php
More file actions
35 lines (24 loc) · 728 Bytes
/
getcombos.php
File metadata and controls
35 lines (24 loc) · 728 Bytes
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
<?php
$con = mysqli_connect('localhost','root','root','vlabs_database');
if (!$con) {
die('Could not connect: ' . mysqli_error($con));
}
mysqli_select_db($con,"vlabs_database");
$sql="SELECT * FROM institutes";
$sql1="SELECT * FROM disciplines";
$result1 = mysqli_query($con,$sql1);
$result = mysqli_query($con,$sql);
echo "Select Institute Name :";
echo "<select>";
while($row = mysqli_fetch_array($result)) {
echo "<option>" . $row['institute_name'] . "</option>";
}
echo "</select>";echo "<br><br>";
echo "Select Discipline Name : ";
echo "<select>";
while($row = mysqli_fetch_array($result1)) {
echo "<option>" . $row['discipline_name'] . "</option>";
}
echo "</select>";
mysqli_close($con);
?>