prepare(" SELECT id, project_id, project_name, client_id FROM projects WHERE project_id = ? AND client_id = ? "); $stmt->execute([$project_id, $client_id]); $project = $stmt->fetch(); if (!$project) { $_SESSION['error'] = "Project not found or access denied"; header('Location: projects-list.php'); exit; } // Get batches for this project $stmt = $pdo->prepare(" SELECT batch_number, total_urls, sent_count, upload_type, created_at FROM survey_url_batches WHERE project_id = ? ORDER BY batch_number DESC "); $stmt->execute([$project_id]); $batches = $stmt->fetchAll(); } catch (Exception $e) { error_log("Manage Survey URLs error: " . $e->getMessage()); $error = "Error loading project: " . $e->getMessage(); } $page_title = "Manage Survey URLs"; include 'client-portal-header.php'; ?>
No URL batches created yet. Use the form above to upload your first batch.