-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstudent_homepage.php
150 lines (124 loc) · 3.51 KB
/
student_homepage.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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<?php
include_once 'core.inc.php';
include_once 'connect.inc.php';
$username=getuserfield('username');
$firstname = getuserfield('firstname');
$surname = getuserfield('surname');
if(isset($_GET['value'])){
if($_GET['value']==2){
echo '<script>alert("Sorry you have already selected the room number")</script>';
}
}
//echo $username.'<br>';
$q="SELECT * FROM central_table WHERE firstname = '{$firstname}' ";
//$qe="SELECT * FROM registration_form WHERE firstname = '{$firstname}' ";
//$qs="select * from central_table where username = '{$username}'";
//$query_run=mysql_query($q) or die(mysql_error());
$query_run=mysql_query($q) ;
//$query1_run=mysql_query($qe);
$nor=mysql_num_rows($query_run);
$row=mysql_fetch_array($query_run);
//$row1=mysql_fetch_array($query1_run);
echo '<br>';
if(!empty($firstname)&&!empty($surname)){
echo 'You\'re logged in, '.$firstname.' '.$surname.' Welcome'.'<br><br>';
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Flower</title>
<meta http-equiv="Content-Language" content="English" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="style.css" media="screen" />
</head>
<body>
<div id="wrap">
<div id="header">
<h1><a href="#"><?php
echo 'Welcome '.$firstname.' '.$surname;
?></a></h1>
</div>
<div id="right">
<?php
if($nor){
echo '<table width="400" border="1">
<caption>
Your Details
</caption>
<tr>
<th scope="row">First Name *</th>
<td>'; echo $row['firstname']; echo '</td>
</tr>
<tr>
<th scope="row">Last Name *</th>
<td>'; echo $row['surname']; echo '</td>
</tr>
<tr>
<th scope="row">Address *</th>
<td>'; echo $row['address']; echo '</td>
</tr>
<tr>
<th scope="row">Username *</th>
<td>'; echo $row['username']; echo '</td>
</tr>
<tr>
<th scope="row">department *</th>
<td>'; echo $row['department']; echo '</td>
</tr>
<tr>
<th scope="row">Email Address *</th>
<td>'; echo $row['email']; echo '</td>
</tr>
<tr>
<th scope="row">Room number</th>
<td>';
if($row['room_no']!=0)
echo $row['room_no'];
else
echo 'Room not yet selected';
echo '</td>
</tr>
<tr>
<th scope="row">Telephone Number</th>
<td>';echo $row['telephone']; echo '</td>
</tr>
</table>';
}
?>
<tr>
<td colspan="2" style="text-align:center">
<!-- We are grateful to you for keeping this link in place. thank you. -->
<input type="submit" value="Submit"> ( <a href="http://www.freecontactform.com/html_form.php">HTML Form</a> )
</td>
</tr>
</table>
</form>
<h2> </h2>
</div>
<div id="left">
<h3>Things to do :</h3>
<ul>
<?php
if($nor)
{
echo '<li><a href="room_selection.php">Room selection</a></li>
<li><a href="#">Inventory selection</a></li>
<li><a href="fee_details.php">fee details</a></li>
<li><a href="student_page.php">Mess</a></li>';
}
?>
</ul>
<h3>Archives</h3>
<ul>
<li><a href="password_change.php">Password Change</a></li>
<li><a href="logout.php">Log out</a></li>
</ul>
</div>
<div style="clear: both;"> </div>
<div id="footer">
Designed by <a href="http://www.free-css-templates.com/">Free CSS Templates</a>, Thanks to <a href="http://www.openwebdesign.org/">Web Design Firm</a>
</div>
</div>
</body>
</html>