index.php 633 B

123456789101112131415161718192021
  1. <?php
  2. # if method is post
  3. if ($_SERVER['REQUEST_METHOD'] === 'POST') {
  4. $_SESSION['page'] = $_POST['page'];
  5. echo $_SESSION['page'];
  6. return_index();
  7. }
  8. ?>
  9. <main class="container">
  10. <form action="" method="post">
  11. <input type="hidden" name="page" v-model="page">
  12. <button @click="page = 'reporte'" type="submit">Reporte de calificaciones <i class="fas fa-file-excel"></i></button>
  13. <button @click="page = 'cálculo'" type="submit">Cálculo de calificaciones <i class="fas fa-calculator"></i></button>
  14. </form>
  15. </main>
  16. <script>
  17. PetiteVue.createApp({
  18. page: null
  19. }).mount();
  20. </script>