Implement CSRF protection in contact form: Added session management and CSRF token validation to enhance security. Updated AJAX response handling in JavaScript to reset button state after submission.

This commit is contained in:
TheOnlyMace
2026-01-06 21:49:24 +01:00
parent a6aab5208d
commit 385baf2db7
3 changed files with 29 additions and 0 deletions

View File

@@ -77,6 +77,10 @@
})
.then(response => response.json())
.then(data => {
// Reset button state
submitBtn.textContent = originalText;
submitBtn.disabled = false;
if (data.success) {
// Reset form
form.reset();