Hello i am new to php and security and i try to learn.
Can you please comment on my code if i do the XSS and CSRF correctly with ajax and is it secure enough or maybe i need to add something? please ignore the front end its just some copy paste.
Do i really need data validation checks in my mailer.php ?? because i use the html5 form validation checks.
And do i need another die(); after the mail was send(the red comment)
Also i have CSRF , do i need Google reCAPTCHA? or its CSRF or the reCAPTCHA but not both of them together?
**I know the existence of phpmailer but i don’t want to use it because i want to test/learn things with mail() function