Jump to content

unexpected T_VARIABLE


aebstract

Recommended Posts

I changed this line:

if ($qp == 1){ $arr1[1] = "$firstname $row[lastname]"; $arrid1[1] = "$row[id]"; $r1[1] = "$row[r1]"; $r1s[1] = "$row[r1s]"; $r1rt[1] = "$row[r1rt]"; }

 

to this:

if ($qp == 1){ if (($row[q1] != '99.999') OR ($row[q2] != '99.999') OR ($row[q3] != '99.999')) { mysql_query ("UPDATE participants SET qpts = '16' WHERE id = $row[id]") }  $arr1[1] = "$firstname $row[lastname]"; $arrid1[1] = "$row[id]"; $r1[1] = "$row[r1]"; $r1s[1] = "$row[r1s]"; $r1rt[1] = "$row[r1rt]"; }

 

and now I get this error:

Parse error: syntax error, unexpected T_VARIABLE in /home/orsca/public_html/pairings.php  on line 227

 

 

 

 

edit: I noticed I had a space between mysql_query and (, removed the space and now I get:

 

Parse error: syntax error, unexpected '}' in /home/orsca/public_html/pairings.php  on line 227

Link to comment
https://forums.phpfreaks.com/topic/199692-unexpected-t_variable/
Share on other sites

Did Enter key broke on your keyboard?

 

Here, finding error here should be easier:

if($qp == 1){ 
  if (($row[q1] != '99.999') OR ($row[q2] != '99.999') OR ($row[q3] != '99.999')) { 
    mysql_query ("UPDATE participants SET qpts = '16' WHERE id = $row[id]")
  }  
  $arr1[1] = "$firstname $row[lastname]";
  $arrid1[1] = "$row[id]";
  $r1[1] = "$row[r1]";
  $r1s[1] = "$row[r1s]";
  $r1rt[1] = "$row[r1rt]";
}

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.