I have a comment system, but people are spamming it, with false names. Some people are using my name. To prevent this I would like to change the table row background color to a different color when I post a comment so people know it is by me.
My code is this so far, apparently it doesnt work, but I tried to write it how I thought it would work.
Code: Select all
$result4 = mysql_query($sql4) or die(mysql_error());
while($row4 = mysql_fetch_array($result4)) {
echo "<tr".if $row['ip']==68.195.158.89{echo 'bgcolor=red'}else{};.">";
echo "<td align=left width=100 valign=top>".$row4['name']."</td>";
echo "<td align=left width=400>".$row4['comment']."</td>";
echo "</tr>";
echo "<tr>";
echo "<td>";
echo " ";
echo "</td>";
echo "</tr>";
} mysql_close($connection2);
?>
</table>
</center>The error I get is
If any one can help me solve this, I would greatly appreciate it.Parse error: parse error, unexpected T_IF in /home/muot/public_html/muotreport2.php on line 494
Thanks So Much!