I have this code
<?php
session_start();
if (!isset($_SESSION['dostap'])) {
header("Location: index.php");
}
// тук останалия код от файла :)
?>
<!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=windows-1251" />
<meta name="publisher" content="Dj BalthazaR /skype:sladur_pz/" />
<meta name="copyright" content="© Disco ORANGE 2008-2009" />
<meta http-equiv="Content-Language" content="bg" />
<meta name="language" content="bulgarian" />
<meta name="rating" content="general" />
<title>CS-BG-Gaming</title>
<link rel="shortcut icon" href="images/favicon.ico" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table width="75%" align="center" id="main" border="0" cellspacing="2" cellpadding="2">
<tr>
<div align="left"><td colspan="3" valign="top" /><a href="index.php" /><img src="images/header.jpg" border="0" width="988" height="150" alt="Disco ORANGE" /></img></a></td></div>
</tr>
<tr>
<td colspan="3" id="menu" valign="top" />
<?php require("../includes/header_menu.php"); ?>
</td>
</tr>
<tr>
<td width="20%" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" id="menubg">Навигация</td>
</tr>
<tr>
<td colspan="3" class="menubrd">
<?php require("includes/menu.php"); ?>
</td>
</tr>
</table>
</td>
<td width="50%" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" id="menubg">Администраторски панел</td>
</tr>
<tr>
<td colspan="3" class="menubrd">
<?PHP
include('conn_novini.php');//добавяме config файла
$getid = $_GET['id'];
if (!$_POST['news'])
{
// формата не е била използвана
$our = mysql_query("SELECT awtor, ime, nowina FROM news where id='$getid' ");
while($r=mysql_fetch_array($our)){
// взимаме инфо за да го покажем в полетата.
?>
<form method="POST">
Автор: <input type="text" name="awtor" value="<?PHP echo"$r[awtor]"; ?>"/><br />
Име на новината: <br /><input type="text" value="<?PHP echo"$r[ime]"; ?>" name="ime"><br />
Новина: <br /><textarea rows="7" name="nowina" cols="40" type="text"><?PHP echo"$r[nowina]"; ?></textarea><br />
<input name="news" type="submit" value="Добави!">
</form>
<?php
}
}
else{
$ime = $_POST['ime'];
$awtor = $_POST['awtor'];
$nowina = $_POST['nowina'];
//взимаме информацията от полетата, които юзера е въвел
$awtor = htmlspecialchars($awtor);
$ime = htmlspecialchars($ime);
$nowina = htmlspecialchars($nowina);
echo ("Успешно променена новина!"); //ако пък са равно ъпдейтваме базата данни
$update = mysql_query("Update news set awtor = '$awtor' , ime = '$ime' , nowina = '$nowina' where id = '$getid'");
}
?>
</td>
</tr>
</table>
</td>
</tr>
<?php require("includes/footer.php"); ?>
</table>
</body>
</html>
But when I try to load my page, this appears:
Parse error: syntax error, unexpected $end in C:\xampp\htdocs\admin\admin_news_edit.php on line 113
Can someone help me?