Jump to content

[SOLVED] PHP error... Help


Francis

Recommended Posts

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Refresh" content="5;url=index.php" />
<title>Feedback deleted • [FFA] Clan and Server</title>
<style type="text/css">
<!--
.style1 {
font-size: 18px;
font-weight: bold;
background-color: #666666;
color: #FFFFFF;
}
.style2 {
font-size: 18px;
font-weight: bold;
background-color: #CCCCCC;
color: #FFFFFF;
}
.textheader {
margin-left:auto 2.5px;
}
.text {
margin-left:auto 5px;
}
-->
</style>
</head>

<body>
  <?php
  	if(!strcmp($_SERVER['REMOTE_ADDR'], "67.70.100.149"))
{
	$con = mysql_connect("localhost","********","********");
	if (!$con)
	{
		echo '<table width="70%" border="0" align="center" style="border: #000000 medium solid;">
  <tr class="style1">
	<td>Error!</td>
  </tr>
  <tr class="style2">
	<td>The following error was found:
	<p>' . mysql_error() .'</p></td>
  </tr>
</table>';
		die('Could not connect: ' . mysql_error());
	}
	else
	{

		mysql_select_db("gtasam_ffa", $con);

		$id = $_POST[PostID];
		$query = "UPDATE `gtasam_ffa`.`feedback` SET `Comment` = '<removed>' WHERE `feedback`.`PostID`=$id";

		mysql_query($query);

		mysql_close($con);
		echo '<table width="70%" border="0" align="center" style="border: #000000 medium solid;">
				<tr class="style1">
					<td>Information</td>
				</tr>
				<tr class="style2">
					<td>Feedback succesfully deleted! You will be redirected in 5 seconds!<br />If nothing happens, please click <a href="index.php">here</a>.
					</td>
				</tr>
			</table>';
	}
}
else
{
	echo '<table width="70%" border="0" align="center" style="border: #000000 medium solid;">
  			<tr class="style1">
				<td>Error!</td>
 			</tr>
  			<tr class="style2">
				<td>The following error was found:
					<p>You tried to access a page that you are not allowed to access.</p>
				</td>
  			</tr>
		</table>';
?>
</body>
</html>

Gives that:

 

Parse error: syntax error, unexpected $end in ********/public_html/test/testing/delete.php on line 85

Link to comment
https://forums.phpfreaks.com/topic/100242-solved-php-error-help/
Share on other sites

An end error 99% of the time means theres an error with your brackets  :D "doh"

 

Looks like you forgot the last one

 

}
else
{
	echo '<table width="70%" border="0" align="center" style="border: #000000 medium solid;">
  			<tr class="style1">
				<td>Error!</td>
 			</tr>
  			<tr class="style2">
				<td>The following error was found:
					<p>You tried to access a page that you are not allowed to access.</p>
				</td>
  			</tr>
		</table>';
?>
</body>
</html>

 

should be

 

}
else
{
	echo '<table width="70%" border="0" align="center" style="border: #000000 medium solid;">
  			<tr class="style1">
				<td>Error!</td>
 			</tr>
  			<tr class="style2">
				<td>The following error was found:
					<p>You tried to access a page that you are not allowed to access.</p>
				</td>
  			</tr>
		</table>';
          }
?>
</body>
</html>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Refresh" content="5;url=index.php" />
<title>Feedback deleted • [FFA] Clan and Server</title>
<style type="text/css">
<!--
.style1 {
font-size: 18px;
font-weight: bold;
background-color: #666666;
color: #FFFFFF;
}
.style2 {
font-size: 18px;
font-weight: bold;
background-color: #CCCCCC;
color: #FFFFFF;
}
.textheader {
margin-left:auto 2.5px;
}
.text {
margin-left:auto 5px;
}
-->
</style>
</head>

<body>
  <?php
  	if(!strcmp($_SERVER['REMOTE_ADDR'], "67.70.100.149"))
{
	$con = mysql_connect("localhost","********","********");
	if (!$con)
	{
		echo '<table width="70%" border="0" align="center" style="border: #000000 medium solid;">
  <tr class="style1">
	<td>Error!</td>
  </tr>
  <tr class="style2">
	<td>The following error was found:
	<p>' . mysql_error() .'</p></td>
  </tr>
</table>';
		die('Could not connect: ' . mysql_error());
	}
	else
	{

		mysql_select_db("gtasam_ffa", $con);

		$id = $_POST[PostID];
		$query = "UPDATE `gtasam_ffa`.`feedback` SET `Comment` = '<removed>' WHERE `feedback`.`PostID`=$id";

		mysql_query($query);

		mysql_close($con);
		echo '<table width="70%" border="0" align="center" style="border: #000000 medium solid;">
				<tr class="style1">
					<td>Information</td>
				</tr>
				<tr class="style2">
					<td>Feedback succesfully deleted! You will be redirected in 5 seconds!<br />If nothing happens, please click <a href="index.php">here</a>.
					</td>
				</tr>
			</table>';
	}
}
else
{
	echo '<table width="70%" border="0" align="center" style="border: #000000 medium solid;">
  			<tr class="style1">
				<td>Error!</td>
 			</tr>
  			<tr class="style2">
				<td>The following error was found:
					<p>You tried to access a page that you are not allowed to access.</p>
				</td>
  			</tr>
		</table>';
}
?>
</body>
</html>

Gives that:

 

Parse error: syntax error, unexpected $end in ********/public_html/test/testing/delete.php on line 85

 

(edited by kenrbnsn to change tags to


)

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.