I am trying to have a button that will check the status and respond according. So i tried using the if else statement to check the status. However its telling me that there is a Parse error: syntax error, unexpected 'if' (T_IF). Wonder if anyone what is causing the syntax error.
$list .= "<tr><td>".$userName."</td><td>".$usertype."</td><td>".$email."</td><td>". $address."</td><td>".$postalCode."</td><td>".$status."</td><td>
<form method='post'>"
. if($status==1){ .
"<input type='hidden' name='ban' value='2'>
<input type='submit' name='banned' value='Ban'>"
.}else{ .
"<input type='hidden' name='ban' value='1'>
<input type='submit' name='uban' value='unBan'>"
.}. "</td><td>
<input type='hidden' name='name' value='$userName'>
<input type='submit' name='remove' value='Remove'>
</form>
</td></tr>";
<?phpon top of your code, write HTML as is (with line feeds and tabulation) and temporarily switch to PHP mode to insert dynamic stuff.