What is the potential issue with using GET in the form action and POST in the function?
The potential issue with using GET in the form action and POST in the function is that the form data may not be securely transmitted. GET method appends form data to the URL, making it visible and potentially exploitable. To solve this issue, you should use POST method both in the form action and in the function to securely transmit form data.
<form method="POST" action="process_form.php">
<!-- form fields here -->
</form>
<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
// process form data securely
}
?>