I'm getting two errors detailed below:
Notice: Undefined index: username in C:\wamp\www\member.php on line 8
Call Stack
# Time Memory Function Location
1 0.0006 131808 {main}( ) ...\member.php:0
( ! ) Notice: Undefined index: passwd in C:\wamp\www\member.php on line 9
Call Stack
# Time Memory Function Location
1 0.0006 131808 {main}( ) ...\member.php:0
And my code is:
<?php
// include function files for this application
require_once('require_fns.php');
session_start();
//create short variable names
$username = $_POST['username'];
$passwd = $_POST['passwd'];
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('Warning:');
echo 'You have not filled the form out correctly.
Please go back and try again.';
//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();
?>
And I don't know how to fix it and I've been stuck on it for some time.