Invalid request method. Please submit the quiz."; include 'includes/footer.php'; exit; } $user_name = isset($_POST['user_name']) ? htmlspecialchars($_POST['user_name']) : 'Guest'; $scores = [ 'v' => 0, // Visual 'a' => 0, // Auditory 'r' => 0, // Read/Write 'k' => 0, // Kinesthetic ]; // Loop through 20 questions for ($i = 0; $i < 20; $i++) { if (isset($_POST['q' . $i])) { $answer = $_POST['q' . $i]; if (array_key_exists($answer, $scores)) { $scores[$answer]++; } } } // Find the primary learning style arsort($scores); // Sort scores in descending order $primary_style_key = key($scores); $styles_info = [ 'v' => ['name' => 'Visual', 'icon' => 'bi-eye-fill'], 'a' => ['name' => 'Auditory', 'icon' => 'bi-ear-fill'], 'r' => ['name' => 'Read/Write', 'icon' => 'bi-pencil-fill'], 'k' => ['name' => 'Kinesthetic', 'icon' => 'bi-hand-index-thumb-fill'], ]; $primary_style_name = $styles_info[$primary_style_key]['name']; $primary_style_icon = $styles_info[$primary_style_key]['icon']; // --- Store results in the database --- try { $pdo = db(); $stmt = $pdo->prepare("INSERT INTO quiz_attempts (v_score, a_score, r_score, k_score, primary_style) VALUES (?, ?, ?, ?, ?)"); $stmt->execute([$scores['v'], $scores['a'], $scores['r'], $scores['k'], $primary_style_key]); } catch (PDOException $e) { // For development, you might want to log the error. // For production, you could show a generic error message. error_log("Database error: " . $e->getMessage()); } ?>

Your Primary Learning Style is:

This suggests you learn best when you can see information. Look for diagrams, videos, and charts to help you study.


Your Score Breakdown

0 ? max($scores) : 1; // Avoid division by zero foreach ($scores as $key => $score): $percentage = ($score / 20) * 100; ?>
/ 20
%

Recommended Tools

[ 'Canva' => 'Create diagrams and infographics to visualize concepts.', 'MindMeister' => 'Build mind maps to connect ideas and see the big picture.', 'Draw.io' => 'Free tool for creating flowcharts, diagrams, and network charts.', ], 'Auditory' => [ 'Spotify (for podcasts)' => 'Listen to educational podcasts to learn on the go.', 'Audible' => 'Use audiobooks to absorb content without reading.', 'Google Podcasts' => 'Discover and listen to lectures and talks on various subjects.', ], 'Read/Write' => [ 'Notion' => 'Organize notes, create summaries, and build a personal knowledge base.', 'Evernote' => 'Capture and organize notes, articles, and documents in one place.', 'Google Docs' => 'Write, edit, and collaborate on notes and essays.', ], 'Kinesthetic' => [ 'Google Colab' => 'Write and execute Python code to experiment with data and algorithms.', 'Tinkercad' => 'Design and build 3D models to understand spatial concepts.', 'PhET Simulations' => 'Engage with interactive simulations for science and math.', ], ]; $recommended_tools = $tools[$primary_style_name] ?? []; ?>
    $description): ?>
  • :

Personalized Study Time Allocation (60-Min Model)

[ ['Activity' => 'Watch educational videos/documentaries', 'Time' => '20 mins'], ['Activity' => 'Create mind maps and diagrams', 'Time' => '15 mins'], ['Activity' => 'Use color-coded notes', 'Time' => '15 mins'], ['Activity' => 'Review and summarize', 'Time' => '10 mins'], ], 'Auditory' => [ ['Activity' => 'Listen to a podcast or lecture recording', 'Time' => '20 mins'], ['Activity' => 'Discuss concepts with a study partner', 'Time' => '20 mins'], ['Activity' => 'Read notes aloud', 'Time' => '10 mins'], ['Activity' => 'Summarize key points verbally', 'Time' => '10 mins'], ], 'Read/Write' => [ ['Activity' => 'Read a chapter or article', 'Time' => '20 mins'], ['Activity' => 'Write a summary of what you read', 'Time' => '20 mins'], ['Activity' => 'Create outlines and lists', 'Time' => '10 mins'], ['Activity' => 'Review and rewrite notes', 'Time' => '10 mins'], ], 'Kinesthetic' => [ ['Activity' => 'Engage in a hands-on activity or simulation', 'Time' => '25 mins'], ['Activity' => 'Take short, active breaks', 'Time' => '5 mins'], ['Activity' => 'Use flashcards and manipulate them', 'Time' => '20 mins'], ['Activity' => 'Apply concepts to a real-world problem', 'Time' => '10 mins'], ], ]; $study_plan = $study_plans[$primary_style_name] ?? []; ?>
Activity Time

Stability Score

'You have a strong and consistent learning preference. This clear focus can make it easier to find effective study strategies.', 'medium' => 'You have a primary learning style, but you also show tendencies in other areas. This flexibility can be an advantage.', 'low' => 'You are a versatile learner with a balanced mix of styles. You can adapt to various learning environments, which is a great strength.', ]; if ($stability_score >= 7) { $stability_level = 'high'; $stability_message = $stability_messages['high']; } elseif ($stability_score >= 4) { $stability_level = 'medium'; $stability_message = $stability_messages['medium']; } else { $stability_level = 'low'; $stability_message = $stability_messages['low']; } ?>
/10


$score) { echo ''; } ?> $description) { echo ''; } ?> $item) { echo ''; echo ''; } ?>
Take Quiz Again