Jump to content

[SOLVED] can't figure out whats wrong T_T


r34p3rex

Recommended Posts

i'm getting this error everytime i run the page

Parse error: parse error, unexpected '[' in /homepages/19/d176940355/htdocs/d176940355/status.php on line 314

 

heres the php snippet

 

<?php
	mysql_select_db($database_db1, $db1);
	$rostertable = $row_teams['tablename'];
	$charteam = $row_characters['charname'];
	$query_ct = "SELECT * FROM `$rostertable` WHERE charname='$charteam' LIMIT 1";
	$ct = mysql_query($query_ct, $db1) or die(mysql_error());
	$row_ct = mysql_fetch_assoc($ct);
	$totalRows_ct = mysql_num_rows($ct);
	if($row_ct['onroster'] == "1")
		{
		echo "<font color='#FF0000'>On Roster</font>";
		}
	if($row_ct['onroster'] == "0")
		{
			if(row_ct['team'] == "team1")
					{
					mysql_select_db($database_db1, $db1);
					$query_onteam = "SELECT * FROM guildwars ORDER by gwID DESC LIMIT 1";
					$onteam = mysql_query($query_onteam, $db1) or die(mysql_error());
					$row_onteam = mysql_fetch_assoc($onteam);
					$totalRows_onteam = mysql_num_rows($onteam);
					echo "<font color='#0099FF'>";
					echo $row_onteam['team1'];
					echo "</font>";
					}
			if(row_ct['team'] == "team2")
					{
					mysql_select_db($database_db1, $db1);
					$query_onteam = "SELECT * FROM guildwars ORDER by gwID DESC LIMIT 1";
					$onteam = mysql_query($query_onteam, $db1) or die(mysql_error());
					$row_onteam = mysql_fetch_assoc($onteam);
					$totalRows_onteam = mysql_num_rows($onteam);
					echo "<font color='#00FF66'>";
					echo $row_onteam['team2'];
					echo "</font>";
					}
		}
	else if(totalRows_ct == "0")
			{
			echo "<font color='CC0033'>Not Registered</font>";
			}
	?>

 

line 314 refers to this line

 

		if($row_ct['onroster'] == "0")
		{
>>>>>>>>.				if(row_ct['team'] == "team1")
					{
					mysql_select_db($database_db1, $db1);
					$query_onteam = "SELECT * FROM guildwars ORDER by gwID DESC LIMIT 1";
					$onteam = mysql_query($query_onteam, $db1) or die(mysql_error());
					$row_onteam = mysql_fetch_assoc($onteam);

Link to comment
https://forums.phpfreaks.com/topic/61583-solved-cant-figure-out-whats-wrong-t_t/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.