document.getElementById("nameForm").addEventListener("submit", function(event) { event.preventDefault(); let name = document.getElementById("nameInput").value; // Call a PHP script using AJAX to check the name against the CSV file // Update the result div based on the response });
$csvFile = 'names.csv';