-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgetcourse.php
38 lines (31 loc) · 904 Bytes
/
getcourse.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
<?php
include("logic/back.php");
include("logic/connection.php");
$degid=$_REQUEST['deg'];
$clgid=$_REQUEST['clg'];
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Document</title>
</head>
<body>
<select name="crs" id="crsvali" onchange="fun3(this.value,'<?php echo $clgid;?>','<?php echo $degid;?>')">
<option value="">select course</option>
<?php
$query=mysqli_query($con,"SELECT * FROM `deg_crs_clg` where degid='$degid' and clgid='$clgid'");
while($result=mysqli_fetch_assoc($query)){
$crsid=$result['crsid'];
?>
<option value="<?php echo $crsid; ?>"><?php
$query2=mysqli_query($con,"SELECT * FROM `course` where courseid='$crsid'");
while($result2=mysqli_fetch_assoc($query2)){
$crsnm=$result2['coursename'];
}
echo $crsnm;?></option>
<?php
}
?>
</select>
</body>
</html>