query("SELECT * FROM surveys WHERE id = $survey_id"); $survey = $result->fetch_assoc(); if (!$survey) { $_SESSION['message'] = "Survey not found."; $_SESSION['message_type'] = "error"; header("Location: index.php"); exit; } $pages = $db->query("SELECT * FROM pages WHERE survey_id = $survey_id ORDER BY page_number"); // Construct the take survey URL $take_survey_url = "http://{$_SERVER['HTTP_HOST']}/take_survey.php?id={$survey_id}&unique_id={$survey['unique_id']}="; ?>
= nl2br(htmlspecialchars($survey['welcome_content'])) ?>
= htmlspecialchars($choice['choice_text']) ?>
Redirect: = htmlspecialchars($choice['redirect_url']) ?>
Finish Button: = $finish_button['choice_text'] ?>
Redirect: = htmlspecialchars($finish_button['redirect_url']) ?>