...

View Full Version : unexpected T_IF



Jon W
03-21-2009, 05:30 AM
<?php
while($msg = mysql_fetch_array($chat)) {
if($msg['user_level'] == 3 && $_SESSION['user_level'] == 4) {

echo "<tr>";
echo "<td align=\"left\" valign=\middle\" bgcolor=\"#343434\" width=\"600\">[".$msg['time']."]<span class=\"mod\">~MOD~</span><a href=\"javascript:poptastic('/controls/chat.php?msg_id=".$msg['msg_id']."');\" title='User ID: ".$msg['user_id']."'>" . ucfirst($msg['username']) . "</a>: <span class=\"textmod\">" . $msg['msg'] ."</span></td>";
echo "<tr>";
}

elseif($msg['user_level'] == 3) {

echo "<tr>";
echo "<td align=\"left\" valign=\middle\" bgcolor=\"#343434\" width=\"600\">[".$msg['time']."]<span class=\"mod\">~MOD~</span>" . ucfirst($msg['username']) . "</a>: <span class=\"textmod\">" . $msg['msg'] ."</span></td>";
echo "<tr>";

}


if($msg['user_level'] == 4) {

echo "<tr>";
echo "<td align=\"left\" valign=\middle\" bgcolor=\"#343434\" width=\"600\">[".$msg['time']."]<span class=\"gm\">~GM~</span>" . ucfirst($msg['username']) . ": <span class=\"textgm\">" . $msg['msg']. "</span></td>";
echo "<tr>";

}
elseif($msg['user_level'] == 2 && $_SESSION['user_level'] == 4) {

echo "<tr>";
echo "<td align=\"left\" valign=\middle\" bgcolor=\"#343434\" width=\"600\">[".$msg['time']."]<a href=\"javascript:poptastic('/controls/chat.php?msg_id=".$msg['msg_id']."');\" title='User ID: ".$msg['user_id']."'>".ucfirst($msg['username']).": </a>" . $msg['msg'] . "</td>";
echo "<tr>";
}
elseif($msg['user_level'] == 2) {

echo "<tr>";
echo "<td align=\"left\" valign=\middle\" bgcolor=\"#343434\" width=\"600\">[".$msg['time']."]" . ucfirst($msg['username']) .": " . $msg['msg'] . "</td>";
echo "<tr>";
}


}

?>


I keep on a getting a error saying: Parse error: syntax error, unexpected T_IF in /var/www/main.php on line 88

I'm not seeing it. Do you guys see what is wrong with it?

Jon W
03-21-2009, 05:42 AM
Nevermind.. lol Stupid error on my end.

_Aerospace_Eng_
03-21-2009, 05:58 AM
What was the solution?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum