can someone help me with this syntax problem
i have this form
but how can i insert this if statement (if $contactpersoon show the tablerow else dont show this row)
<?php
include("includes/login.php");
@extract($_POST);
$name = stripslashes($name);
$subject = stripslashes($subject);
$headers = "From: $email \n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html";
$messagefm = stripslashes
("
<p align=\"center\"><font size=\"4\">$subject</font></p>
<center><table border=\"0\" width=\"23%\">
<tr>
<td width=\"50%\" nowrap bgcolor=\"#C0C0C0\">Datum dienstverlening</td>
<td width=\"50%\" nowrap>$datum_dienstverlening</td>
</tr>
if ($contactpersoon)
echo "<tr><td width=\"50%\" nowrap bgcolor=\"#C0C0C0\">Contactpersoon</td><td width=\"50%\" nowrap>$contactpersoon</td></tr>";
<tr>
<td width=\"50%\" nowrap bgcolor=\"#C0C0C0\">Budgetnummer afdeling</td>
<td width=\"50%\" nowrap>$budgetnummer_afdeling</td>
</tr>
</table></center>
");
mail('test@hr.nl',$subject,$messagefm,"$headers");
header("location:bedankt.php");
?>