Beste bezoekers
Ik heb een fout in mijn beheer nieuws pagina, ik krijg een syntax error maar ik zie hem maar niet.
Misschien dat jullie het weten?
De error:
PHP
Parse error: syntax error, unexpected T_VARIABLE in /home/u624378536/public_html/dennis/Beheerder/nieuws.php on line 117
Het script:
PHP
<?php
include_once "inc/inc.include.left.php";
?>
<div class="right_content">
<h2>Bewerk uw nieuws pagina</h2>
<p>
<table id="rounded-corner" summary="2007 Major IT Companies' Profit">
<thead>
<tr>
<th scope="col" class="rounded-company"></th>
<th scope="col" class="rounded">Nieuws</th>
<th scope="col" class="rounded">Auteur</th>
<th scope="col" class="rounded">Datum</th>
<th scope="co1" class="rounded"> </th>
<th scope="col" class="rounded">Bewerk</th>
<th scope="col" class="rounded-q4">Verwijder</th>
</tr>
</thead>
<tbody>
<?php
$nQuery = "SELECT Nieuws_ID,Nieuws_Onderwerp,Nieuws_Datum,Nieuws_Auteur FROM NieuwsBerichten ORDER BY Nieuws_ID DESC";
if( $nieuws = $mysqli->query($nQuery) )
{
while($news = $nieuws->fetch_object())
{
//variables
$ID = intval($news->Nieuws_ID);
$Onderwerp = strip_tags($news->Nieuws_Onderwerp);
$Datum = $news->Nieuws_Datum;
$Auteur = strip_tags($news->Nieuws_Auteur);
?>
<tr>
<td><input type="checkbox" name="" /></td>
<td><?php echo $Onderwerp; ?></td>
<td><?php echo $Auteur; ?></td>
<td><?php echo $Datum; ?></td>
<td> </td>
<td><a href="?pagina=bewerk&id=<?php echo $ID; ?>"><img src="images/user_edit.png" alt="" title="" border="0" /></a></td>
<td><a href="#" class="ask"><img src="images/trash.png" alt="" title="" border="0" /></a></td>
</tr>
<?php
}
}
?>
</tbody>
<tfoot>
<tr>
<td colspan="6" class="rounded-foot-left"><em>Alle nieuws berichten die U heeft gepost kan U bijwerken.</em></td>
<td class="rounded-foot-right"> </td>
</tr>
</tfoot>
</table>
<a href="#" class="bt_green"><span class="bt_green_lft"></span><strong>Plaats nieuws</strong><span class="bt_green_r"></span></a>
<a href="#" class="bt_red"><span class="bt_red_lft"></span><strong>Verwijder alles</strong><span class="bt_red_r"></span></a>
<table width="100%">
<?php
if(isset($_GET['id']) && $_GET['pagina'] == 'bewerk')
{
echo '<h2>Nieuwsbericht bijwerken</h2>';
$bQuery = "SELECT Nieuws_ID,Nieuws_Onderwerp,Nieuws_Datum,Nieuws_Auteur,Nieuws_Bericht FROM NieuwsBerichten WHERE Nieuws_ID = '". intval($_GET['id']) ."'";
if( $nieuws = $mysqli->query($bQuery) )
{
$form = $nieuws->fetch_object();
if($_POST['submit'])
{
$error = array();
if(empty($_POST['onderwerp']))
{
$error[] = '<div class="error_box">U kan het invul vak onderwerp niet leeg laten!</div>';
}
if(empty($_POST['bericht']))
{
$error[] = '<div class="error_box">U kan het invul vak bericht niet leeg laten!</div>';
}
$fouten = count($error);
if($fouten > 0)
{
echo '<div class="error_box">';
echo '<b>De volgende fouten waren aanwezig!<br />';
echo '</div>';
foreach($error as $fout)
{
echo $fout;
}
}
else
{
//variables beveiligen
$id = intval($_GET['id']);
$onderwerp = $mysqli->real_escape_string($_POST['onderwerp']);
$bericht = $mysqli->real_escape_string($_POST['bericht']);
echo '<div class="valid_box">';
echo 'U heeft uw nieuws bericht succesvol aangepast!';
echo '</div>';
$mysqli->query("UPDATE NieuwsBerichten SET Nieuws_Onderwerp = '". $onderwerp ."' WHERE Nieuws_ID = '". $_GET['id'] ."'") or die $mysqli->error;
$mysqli->query("UPDATE NieuwsBerichten SET Nieuws_Bericht = '". $bericht ."' WHERE Nieuws_ID = '". $_GET['id'] ."'") or die $mysqli->error;
}
}
echo '<form method="POST">';
?>
<table width="100%">
<tr>
<td width="15%">Onderwerp:</td>
<td><input type="text" name="onderwerp" size="50" value="<?php echo $form->Nieuws_Onderwerp; ?>" /></td>
</tr>
</table>
<table width="100%">
<tr>
<td>Bericht:</td>
</tr>
<tr>
<td><textarea name="bericht" cols="50%" rows="10%"><?php echo $form->Nieuws_Bericht; ?></textarea></td>
</tr>
<tr>
<td><input type="submit" name="submit" value="Plaats nieuws" /></td>
</tr>
</table>
<?php
echo '</form>';
}
}
?>
</table>
</p>
</div>
<?php
include_once "inc/inc.include.right.php";
?>
Toon Meer
Hopelijk weet iemand het?
Met vriendelijke groet,
Frank sijbom