<?php
$to = "service@mysite.no";
$subject = "Reparasjon av " . $_REQUEST['type'] . " fra mysite.no";
$types = if(!empty($_REQUEST['type'])) {echo($_REQUEST['type'] . ". ");};
$reps = if(!empty($_REQUEST['rep'])) {echo($_REQUEST['rep']);};
$message = $types . . $reps . "
Kommentarer:
" . $_REQUEST['kommentarer'] . "
Fra:
" . $_REQUEST['navn'] . "
Telefon: " . $_REQUEST['telefon'] . "
Email: " . $_REQUEST['email'] . "
Bosted: " . $_REQUEST['bosted'];
$headers = "From: " . $_REQUEST['email'] . "
" . 'MIME-Version: 1.0' . "
" . 'Content-type: text/plain; charset=UTF-8' . "
";
if (mail($to, '=?UTF-8?B?'.base64_encode($subject).'?=', $message, $headers)) {
header( 'Location: http://www.mysite.no/' );
} else {
header( 'Location: http://www.mysite.no/' );
}
?>
It says there's a T_IF error in line 4. What's the problem?