-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmember.php
43 lines (34 loc) · 825 Bytes
/
member.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
<?php
// include function files for this application
require_once('package_fns.php');
session_start();
//create short variable names
$username = @$_POST['username'];
$passwd = @$_POST['passwd'];
//handle error if user didnt come from login screen
if ($username && $passwd)
// they have just tried logging in
{
try
{
login($username, $passwd);
// if they are in the database register the user id
$_SESSION['valid_user'] = $username;
}
catch(Exception $e)
{
// unsuccessful login
do_html_header('Problem:');
echo 'You could not be logged in.
You must be logged in to view this page.';
do_html_url('login.php', 'Login');
do_html_footer();
exit;
}
}
do_html_header('Home');
check_valid_user();
// give menu of options
display_user_menu();
do_html_footer();
?>