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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.