Jump to content

[SOLVED] Parse error: syntax error, unexpected T_DO


Thomisback

Recommended Posts

it is difficult to try and figure out a problem from one line of code, php may have told you the error is in this line but if you have missed of a brace or a semi colon from a few lines before it may not fail the parse until this line, in this line in particular I prefer to place each part into a bracket so I know when I go back to it in the future exactly what it is doing

elseif ((isset($_GET['do']) && ($_GET['do'] == 'deny') && (isset($_GET['id']))))

 

		echo "Selecteer een auto die je wilt kopen:";
		echo "<form method="post" action="'.$_SERVER['REQUEST_URI'].'"><select name="auto">
			<option value="6000">Mini Cooper €6.000,-</option>
			<option value="12000">Opel Astra €12.000,-</option>
			<option value="18000">Ford Mondeo ST220 €18.000,-</option>
			<option value="24000">Mercedes 300CE €24.000,-</option>
			<option value="30000">BMW 325Ci €30.000,-</option>
			<option value="36000">Dodge Ram SRT-10 €36.000,-</option>
			<option value="42000">Porsche Cayenne €42.000,-</option>
			<option value="48000">Bentley Continental GT €48.000,-</option>
			<option value="54000">Hummer H2 €54.000,-</option>
			<option value="60000">Rolls-Royce Silver Seraph €60.000,-</option>
		</select> <input type="submit" value="Kopen"></form>";
	}
	else {
		echo "Ongeldige uitnodiging!";
	}
}
}
elseif (isset($_GET['do']) AND $_GET['do'] == 'deny' AND isset($_GET['id'])) { // line 100 causing an error
$iOC = intval($_GET['id']);
$rOCrime = mysql_query('SELECT wapenexpert,leader,chauffeur,auto,wapen FROM $oc WHERE gamename='$prefix' AND id = '.intval($_GET['id']));
$iOCrime = mysql_num_rows($rOCrime);

if ($iOCrime == 0) {
	echo 'Deze OC bestaat niet (meer). Het kan ook zijn dat 1 van de Team Members de Oc geweigert heeft.';
}
else {

 

Hope this helps!

 

Try below code ;) ;) ;)

 


echo "<form method=\"post\" action=\"'.$_SERVER[REQUEST_URI].'\"><select name=\"auto\">
			<option value=\"6000\">Mini Cooper €6.000,-</option>
			<option value=\"12000\">Opel Astra €12.000,-</option>
			<option value=\"18000\">Ford Mondeo ST220 €18.000,-</option>
			<option value=\"24000\">Mercedes 300CE €24.000,-</option>
			<option value=\"30000\">BMW 325Ci €30.000,-</option>
			<option value=\"36000\">Dodge Ram SRT-10 €36.000,-</option>
			<option value=\"42000\">Porsche Cayenne €42.000,-</option>
			<option value=\"48000\">Bentley Continental GT €48.000,-</option>
			<option value=\"54000\">Hummer H2 €54.000,-</option>
			<option value=\"60000\">Rolls-Royce Silver Seraph €60.000,-</option>
		</select> <input type=\"submit\" value=\"Kopen\"></form>";

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.