<?php
// register.php — Legacy standalone registration form.
//
// Superseded by the email + OTP signup flow:
//   signup.php -> signup-email.php -> verify-email.php -> profile-setup.php -> complete-profile.php
//
// This file is kept only so that any old bookmarks/links to register.php
// continue to work; it simply forwards visitors into the new flow.
// Already-authenticated customers are sent straight to their dashboard.

session_start();

if (isset($_SESSION['user_id']) && ($_SESSION['role'] ?? '') === 'customer') {
    header('Location: dashboard.php');
    exit;
}

header('Location: signup.php');
exit;
