-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathresult.php
128 lines (90 loc) · 2.63 KB
/
result.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
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<?php
session_start();
if($_SESSION['authuser']!=1)
{
echo"ACCESS DENIED";
exit();
}
$connect = mysql_connect("localhost", "root", "") or die ("check your server connection");
$uname= $_GET['myusername'];
$upass= $_GET['mypassword'];
$_SESSION['username']=$uname;
$_SESSION['pass']=$upass;
mysql_select_db ("2008b4a5723p");
$query="SELECT * FROM members WHERE username='$uname' and password='$upass'";
$results=mysql_query($query) or die(mysql_error());
if($row = mysql_fetch_array($results))
{ echo"Welcome ". $row['username'] ."!!<br/>";
echo "<table style='width:50%' class='CSSTableGenerator'>
USER INFORMATION<tr>
<th>USERNAME</th>
<th>BRANCH</th>
<th>YEAR OF PASSING</th>
</tr>";
echo "<tr>";
echo "<td>" . $row['username'] . "</td>";
echo "<td>" . $row['branch'] . "</td>";
echo "<td>" . $row['year'] . "</td>";
echo "</tr>";
}
else{
echo"LOGIN FAILED(INVALID USERNAME OR PASSWORD)";
exit();
}
echo "</table>";
?>
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<div id="div1"></div>
</body>
</html>
<br/><br/>
<form method="post" action="default.php" style="float:right;">
<input type="submit" class="myButton" name="add" value="LOGOUT">
</form>
<form method="post" action="add.php" style="float:right;">
<input type="submit" class="myButton" name="add" value="ADD USER INFROMATION">
</form>
<form method="post" action="new_course_reg.php" >
<input type="submit" class="myButton" name="add" value="COURSE REGISTRATION">
</form>
<?php
echo"<center><h2>REGISTERED COURSES</h2></center>";
$query="Select regis.cname, course.credit, course.instructor
FROM course
INNER JOIN regis
ON course.name=regis.cname
AND regis.uname= '$uname';";
$results=mysql_query($query) or die(mysql_error());
echo "<center><table style='width:50%' class='CSSTableGenerator'><tr><td></td><td><b>Course ID</b></td><td><b>Credits</b></td><td><b>Instructor</b></td></tr>\n";
while ($rows=mysql_fetch_assoc($results)) {
echo "<tr><td><a href='Remove_Course.php?cname=$rows[cname]&uuname=$uname'>Remove</a></td>\n";
foreach($rows as $value)
{
echo "<td>\n";
echo $value;
echo "</td>\n";
}
echo "</tr><br>\n";
}
echo "</table></center>\n";
?>
<br/>
<form method="get" action="edit_course.php" style="float:right">
<input type="submit" class="myButton" name="add" value="Edit Course(s)">
</form>
<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>