-
Notifications
You must be signed in to change notification settings - Fork 18
/
select_course.php
41 lines (39 loc) · 947 Bytes
/
select_course.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
<?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");
$name=$_POST['cname'];
$query="SELECT uname FROM regis WHERE cname='$name'";
$results=mysql_query($query) or die(mysql_error());
echo "<a href='admin_page.php'>Admin Login</a><br/>";
echo "Students enrolled in : ".$name."";
echo "<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";
?>
<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>