Hi All,
I am having problems with an unexpected end occureing at the end of this file and i can not see any reason why this might be. Could anyone shed some light on this problem for me.
Cheers
<?PHP
session_start();
include ($_SERVER['DOCUMENT_ROOT']. '/includes/functions.php');
if (is_adminauthed()) //if the admin is authed, data can be changed in BD instantly as it does not need to be verified
{
require ($_SERVER['DOCUMENT_ROOT']. '/includes/header.php');
$query = "SELECT body FROM about WHERE aboutid = 1";
$rs = mysql_query($query) or print(mysql_error());
$data = mysql_fetch_array($rs);
$body = $data['body'];
if (isset($_POST['confirmbtn'])) // if the confirm button is pressed this is where changes are commited
{
$body = $_POST['body'];
$query = "UPDATE about SET body='$body' WHERE aboutid = 1";
$result = mysql_query($query) or die ('could not update the about information');
}
?>
<tr>
<td width="795" colspan="4" border="1" align="center" cellpadding="0" cellspacing="0">
<form method="post" action="editabout.php">
<h2>Edit the about us information</h2>
<br>
<?php if (isset($_POST["confirmbtn"])) { ?>
<br>
<br>
<textarea name="body" cols="80" rows="25"> The about section has been updated </textarea>
<?php }
else
{ ?>
<p> Below is the current content, edit it as required and click the confirm button </p>
<br>
<textarea name="body" cols="80" rows="25"> <?php print $body; ?> </textarea>
<?php
}
?>
<br>
<br>
<form method="post" action="editabout.php" class="button">
<input type="submit" name="confirmbtn" value="Confirm Changes">
</form>
</tr>
<?PHP
require ($_SERVER['DOCUMENT_ROOT']. '/includes/footer.php');
?>