maxudaskin Posted July 26, 2007 Share Posted July 26, 2007 Parse error: syntax error, unexpected ';' in /home/.grable/vzoom/virtualzoom.net/editpireps.php on line 333 I get that error, but line 333 is: ?> <?php if(!$logged_in){ echo "<h1>Error!</h1>\n"; echo "You are not currently logged in, logout failed. Go to <a href=\"login.php\">Login.</a>"; } else{ if ($_SESSION['type'] = 1){ $pirepuser = $_POST ['pirepuser']; if(isset($_POST['edit'])){ $dbserver = ""; $dbname = ""; $dbname2 = ""; $dbuser = ""; $dbpass = ""; $con = mysql_connect($dbserver, $dbuser, $dbpass) or trigger_error(mysql_error(),E_USER_ERROR); mysql_select_db($dbname,$con); if ($_POST['edit'] == 'accept'){ $query2231 = "UPDATE flights SET type = '0'"; mysql_query($query2231,$con); } elseif($_POST['eidt'] =='delete'){ $query2232 = "UPDATE flights SET type = '2'"; mysql_query($query2232,$con); } mysql_close($con); } elseif(isset($_GET['checkpirep'])){ mysql_select_db($database_LeadHost, $LeadHost); $result2 = mysql_query("SELECT * FROM `flights` WHERE `flight_id`='{$flightid}'"); if (mysql_num_rows($result2) > 0) { while($row = mysql_fetch_array($result2)){ if($row['type'] == 0){ $colour = 'E7E7E7'; } elseif($row['type'] == 2){ $colour = 'FF5555'; } else { $colour = 'F4F4F4'; } echo "<td align='center' valign='middle' bgcolor='#".$colour."'><a href='../flights.php?searchfield=". $row['flight_id']."&search=Search+Flights' class='style17'>" . $row['flight_id'] . "</a></td>"; ?> <?php echo "<td align='center' valign='middle' bgcolor='#".$colour."'>" . $row['departure'] . "</td>"; ?> <?php echo "<td align='center' valign='middle' bgcolor='#".$colour."'>" . $row['destination'] . "</td>"; ?> <?php echo "<td align='center' valign='middle' bgcolor='#".$colour."'>" . $row['aircraft'] . "</td>"; ?> <?php echo "<td align='center' valign='middle' bgcolor='#".$colour."'>" . $row['totaltime'] . "</td>"; ?> <?php echo "<td align='center' valign='middle' bgcolor='#".$colour."'>" . $row['date'] . "</td>"; ?> <?php echo "<td align='center' valign='middle' bgcolor='#".$colour."'>" . $row['online'] . "</td>"; ?> </tr><form action="<?php $PHP_SELF; ?>" method="post"> <input name="pirepuser" type="hidden" value="<?php $row32['user']; ?>" /><input name="edit" type="button" value="accept" /> <input name="edit" type="button" value="delete" /></form> <?php }}else( /* Line 333 */ ?> <form action="<?php $PHP_SELF; ?>" method="get"><select name="userid"> <option value="Select One" <?php if (!(strcmp("Select One", $row_usersirep['user']))) {echo "selected=\"selected\"";} ?>>0</option> </select><input name="checkpirep" type="button" value="Check Pirep" /></form> <? } } }} ?> Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted July 26, 2007 Share Posted July 26, 2007 what is line 332? you can avoid alot of syntax errors by simply using a line number editor (such as notepad++ its free) and one with pretty print Your issue might be in back and forth between <?php and <html> try checking that out, but I see line 332 isn't an issue Quote Link to comment Share on other sites More sharing options...
akitchin Posted July 26, 2007 Share Posted July 26, 2007 don't forget to turn word wrapping off when looking for the relevant line. Quote Link to comment Share on other sites More sharing options...
Crow Posted July 26, 2007 Share Posted July 26, 2007 I found something I -think- is an error, and it may or may not be related to your issue. Right on Line 333 }}else( /* Line 333 */ You've got a ( where you should have a {. See if that changes anything. -Steve Quote Link to comment Share on other sites More sharing options...
maxudaskin Posted July 26, 2007 Author Share Posted July 26, 2007 don't forget to turn word wrapping off when looking for the relevant line. I use dreamweaver... Quote Link to comment Share on other sites More sharing options...
maxudaskin Posted July 26, 2007 Author Share Posted July 26, 2007 I found something I -think- is an error, and it may or may not be related to your issue. Right on Line 333 }}else( /* Line 333 */ You've got a ( where you should have a {. See if that changes anything. -Steve LMAO Steve, you are a genius. Quote Link to comment Share on other sites More sharing options...
Crow Posted July 26, 2007 Share Posted July 26, 2007 Just glad to help. Quote Link to comment Share on other sites More sharing options...
vbnullchar Posted July 26, 2007 Share Posted July 26, 2007 TIP: try indent your code for better readability Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.