It seems that you're encountering an issue with the redirect when the contact form is submitted on your WordPress site. There are a few things to consider and potential solutions:
Verify the form action: Make sure the form action attribute in your HTML form is set correctly to point to the appropriate PHP file or script that handles the form submission. Double-check that the form action is set to the correct file path or URL.
Check the file location: Confirm that the PHP script handling the form submission is located in the right directory. In your case, it should be in the "email" folder in the root directory. Ensure that the file name is correct (e.g., index.php) and that it has the necessary permissions to be executed.
Debug the PHP script: It's important to check the PHP script that handles the form submission for any potential errors or issues. Make sure that the PHP code is valid and properly structured. You can try adding some debugging statements or error logging to track any errors that may occur during the script execution. The error_log file you mentioned in the "email" folder could be helpful in this regard.
Verify the redirect URL: Ensure that the redirect URL specified in the header("Location: ...") function is correct. In your case, it seems to be pointing to the same contact page with a query parameter for the success or error message. Check that the URL is valid and accessible.
Check for conflicting plugins or configurations: If you're using any WordPress plugins or configurations related to form handling or redirects, there may be a conflict causing the issue. Try disabling any relevant plugins temporarily and see if the problem persists. Additionally, review your WordPress settings related to permalinks and redirects to ensure they are properly configured.
By reviewing these aspects and addressing any potential issues, you should be able to resolve the redirect problem when the contact form is submitted on your WordPress site.