Skip to content Skip to sidebar Skip to footer

Having Trouble With Php Mail() Function Using Htmlspecialchars, Mail Sends Every Time Page Loads

I have searched and tried multiple ways of doing this, but nothing seems to work out as planned. I am trying to set up a contact form and use

Solution 1:

From what I see you are calling mail($to,$subject,$message,$headers); in the end of the file in every page load. you should put this part in the condition that check if $_POST is set or not.


Post a Comment for "Having Trouble With Php Mail() Function Using Htmlspecialchars, Mail Sends Every Time Page Loads"