getId()); if($user->level == 'admin') header("Location: admins.php"); else header("Location: photos.php"); } catch (ValidationError $ex) { insertError($username, $password); error_redirect($ex->getMessage()); } catch (Exception $ex) { error_redirect("500 - Server error"); } echo "AAA";