Beispiel #1
0
    private function processData()
    {
        if ($this->context == "Data was submitted") {
            $model = new APIModel();
            if ($this->verifyForm()) {
                $result = $model->login($this->username, $this->password);
                if ($result == "Login Succesful!") {
                    //session_register($this->username);
                    $userID = $model->getID($this->username);
                    //echo $userID;
                    if ($userID != "Get ID Fail") {
                        $_SESSION['userid'] = $userID;
                        ?>
						<!--<form method="get" action="../createAlbum/createAlbum.php">
    				<input type="hidden" name="userid" value='<?php 
                        //echo $userID;
                        ?>
'>
    				<input type="submit">
						</form>-->

						<meta http-equiv="refresh" content="0; url=http://localhost:8888/CS460PA2/Newsfeed/newsFeed.php" />

						<?php 
                    }
                } else {
                    print $result;
                }
            }
        }
        if ($this->context == "guest") {
            $_SESSION['userid'] = -99;
            ?>
						

						<meta http-equiv="refresh" content="0; url=http://localhost:8888/CS460PA2/Newsfeed/newsFeed.php" />

						<?php 
        }
    }