-
Notifications
You must be signed in to change notification settings - Fork 18
/
new_course_reg.php
51 lines (48 loc) · 1.12 KB
/
new_course_reg.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
<?php
session_start();
if($_SESSION['authuser']!=1)
{
echo"ACCESS DENIED";
exit();
}
$connect = mysql_connect("localhost","root","") or die ("check your server connection.");
mysql_select_db("2008b4a5723p");
echo "<h2>Course Registration</h2>";
$query="SELECT course.name FROM course";
$results=mysql_query($query) or die(mysql_error());
echo"<b>Available courses</b> <table border=’2’>\n";
while ($rows=mysql_fetch_assoc($results)) {
echo "<tr>\n";
foreach($rows as $value)
{
echo "<td>\n";
echo $value;
echo "</td>\n";
}
echo "</tr><br>\n";
}
echo "</table>\n";
?>
<html>
<body>
<form method="post" action="student_course.php">
<br/>
Your User Name :<input type="text" name="name"><br/>
Course ID :<input type="text" name="course">
<br/>
<input type="submit" class="myButton" name="submit" value="Register">
</form>
</body>
</html>
<footer>
<a href="default.aspx" style="color: white;">Back to home</a>
© 2013 Gaikwad Company, Inc. Course Registration System
</footer>
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<div id="div1"></div>
</body>
</html>