-
Notifications
You must be signed in to change notification settings - Fork 0
/
addcourse~
executable file
·85 lines (57 loc) · 1.91 KB
/
addcourse~
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
<html>
<?php
include("connect.php");
if(isset($_REQUEST['save']))
{
$sem=$_REQUEST['sem'];
$cid=$_REQUEST['ID'];
$nocre=$_REQUEST['noc'];
$type=$_REQUEST['type'];
$dept=$_REQUEST['deptID'];
$query="insert into Course(`Semester`,`Course_ID`,`Credits`,`Course_Tyoe`,`Dept_ID`)
VALUES('$sem','$cid','$nocre','$type','$dept')"; //not single quote its the symbol above quotes here login is table name and the fields inside the ()is field corresponding to table fields name;
echo "<script>console.log('Registration...')</script>";
$res=mysql_query($query);
echo "<script>alert('Registration Successful')</script>";
echo "<script>self.location='form.php'</script>";
}
?>
<head>
<meta charset="UTF-8">
<title>Add Courses</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="wrapper">
<div class="container">
<br><br><br>
<h1>Add Courses to Database</h1>
<br>
Hello Admin! Enter the Course and details to add it to question bank
<br><br><br>
<form class="form">
<input name= "sem" type="number" placeholder="Semester" required></textarea>
<input name="ID" type="text" placeholder="ID (Ex:12IS64 or 12IS6B3)" required>
<input name="noc" type="number" placeholder="Number of Credits" required>
<input name="type" type="text" placeholder="Elective/Mandatory?" required>
<input name="deptID"type="text" placeholder="Department ID" required>
<button type="submit" name= "save" id="login-button">Proceed</button>
</form>
</div>
<ul class="bg-bubbles">
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
</div>
<script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src="js/index.js"></script>
</body>
</html>