예제 #1
0
        header('Location:../?view=register&feedback=Thank you for registering');
    } else {
        if ($reply == "Username and/or email taken!") {
            header('Location:../?view=register&feedback=Username and/or email taken!');
        } else {
            header('Location:../?view=register&feedback=Could not create a new user. An Error Occured!');
        }
    }
}
if (isset($_POST["usname_up"])) {
    //getVariables
    $id = $_SESSION["user_id"];
    $email = htmlentities(htmlspecialchars($_POST["email_up"]));
    $phone = htmlentities(htmlspecialchars($_POST["phone_up"]));
    $address = htmlentities(htmlspecialchars($_POST["address_up"]));
    $username = htmlentities(htmlspecialchars($_POST["usname_up"]));
    $reply = $auth->updateProfile($id, $username, $email, $phone, $address);
    if ($reply) {
        header('Location:../?view=register&feedback=Profile Details Updated Succesfully!');
    } else {
        header('Location:../?view=register&feedback=Could not Update Your Profile. An Error Occured!');
    }
}
function renameResources($location, $name, $extension, $rand)
{
    if (rename($location . $name, $location . $rand . "." . $extension)) {
        return true;
    } else {
        return false;
    }
}