soil-submit.php 864 B

123456789101112131415161718192021222324252627
  1. <?php
  2. /**
  3. * soil-submit.php — DEPRECATED
  4. *
  5. * This file has been superseded by /controllers/soilTestSubmit.php
  6. * which uses PDO prepared statements, CSRF protection, and proper auth.
  7. *
  8. * Any form still pointing here is redirected to the correct controller.
  9. * Do not add logic back to this file.
  10. */
  11. require_once __DIR__ . '/../../../config/database.php';
  12. require_once __DIR__ . '/../../../lib/auth.php';
  13. if (session_status() === PHP_SESSION_NONE) {
  14. session_start();
  15. }
  16. requireLogin();
  17. // Redirect POST submissions to the secure controller, preserving POST data
  18. // is not possible via header redirect — instead show an error so the
  19. // developer knows this endpoint is stale.
  20. http_response_code(410);
  21. echo '<p>This form endpoint is no longer active. '
  22. . 'Please update the form action to <code>/controllers/soilTestSubmit.php</code>.</p>';
  23. exit;