-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathcourse_edit.php
50 lines (46 loc) · 1.51 KB
/
course_edit.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
<?php
require_once('db.php');
if (isset($_REQUEST['id']) ){
$id = $_REQUEST['id'];
$sql = mysqli_query($con,"SELECT * FROM cvsu_course where course_ID = $id");
$d = mysqli_fetch_array($sql);
?>
<form class="form-horizontal" action="action/submitcourse.php?id=<?php echo $d[0]?>" method="post">
<div class="form-group">
<label class="control-label col-sm-2" for="Title">Course:</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="Course" placeholder="Title" name="Course" value="<?php echo $d[2]?>">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="Acronym">Acronym:</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="Title" placeholder="Title" name="Acronym" value="<?php echo $d[3]?>">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="Department">Department:</label>
<div class="col-sm-10">
<?php
$sql = mysqli_query($con,"SELECT * FROM `cvsu_department");
?>
<select class="form-control" name="Department">
<?php
while ($o = mysqli_fetch_array($sql)){
?>
<option value="<?php echo $o[0]?>"><?php echo $o[2] ?></option>
<?php
}
?>
</select>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-default" name="edit-course" >Submit</button>
</div>
</div>
</form>
<?php
}
?>