Example #1
0
        		include('function/Mysql.php');
        		include('function/User.php');
        		$Users = new User(new Mysql());
        		if($Users->Login($_POST['account'], $_POST['password']))
        		{
        			$_SESSION['Account'] = $_POST['account'];
        		}
        		else
        		$err = "帳號或密碼錯誤!";
        	}
        */
        if (isset($_POST['password']) && isset($_POST['confirm']) && $_POST['password'] == $_POST['confirm']) {
            include 'function/Mysql.php';
            include 'function/User.php';
            $Users = new User(new Mysql());
            $Users->UpdatePassword($_SESSION['Account'], $_POST['password']);
            header('Location: paysheet.php');
        } else {
            echo "<script type='text/javascript'>alert('confirming password fails');</script>";
        }
    }
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
	<head>
		<title>
		</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<!-- All the files that are required -->
		<link rel="stylesheet" href="font-awesome/css/font-awesome.min.css">