I am using a mail function to mail it to my email adress, but i want it to send me a message with variables in it. (I have tried to concatenate it with concatenation point, but it doesn't seem to work, or I did not use it right)
<?php $myEmail = "[email protected]"; $emailOnderwerp = "Contact form"; $naam = $_POST['naam']; $email = $_POST['email']; $onderwerp = $_POST['onderwerp']; $bericht = $_POST['bericht']; $mail1 = "<h1>"; $mail2 = "</h1><h2>Afzender:</h2><p>"; $mail3 = " ("; $mail4 = ")</p><h2>Bericht:</h2><p>"; $mail5 = "</p>"; mail("$myEmail","$emailOnderwerp",MESSAGE,"Content-type:text/html; charset=iso-8859-1"."\r\n"."From:[email protected]"); ?>
I know MESSAGE is not supposed to be there, it is just to make it easy to see that the message needs to be placed there.
So I want the message to be $mail1 + $onderwerp + $mail2 + $naam + $mail3 + ...
How can I achieve this?