예제 #1
0
파일: log-post.php 프로젝트: abuwahid16/lab
<?php

include_once "userLogged.php";
$logInfo = new userLogged();
$userEmail = $_POST["user-email"];
$userPassword = $_POST["user-password"];
if ($logInfo->loggedUser($userEmail, md5($userPassword))) {
    echo $_SESSION['user_type'];
    if ($_SESSION['user_type'] == 0) {
        header('Location: http://localhost/photo-album/dashboard.php');
    } else {
        header('Location: http://localhost/photo-album/admin-dashboard.php');
    }
}
예제 #2
0
<?php

include_once "userLogged.php";
$logInfo = new userLogged();
$userEmail = $_POST["user-email"];
$userPassword = $_POST["user-password"];
//echo $userEmail;
if ($logInfo->emailExist($userEmail)) {
    echo "You are registered, did you forget your password?";
} else {
    $logInfo->userRegister($userEmail, $userPassword);
}