<?php
if (!isset($_SESSION))
{
	session_start();
}
require_once ('header.php');
echo "<h1>Voeg reactie toe</h1>";
if ($aangemeld == "ja")
{
	$datum = date("d.m.Y H:i");
	$id = $_POST['page'];
	$sql = "INSERT INTO nieuwsreplys SET naam='".$_SESSION['naam']."', bericht='".$_POST['script1']."', datum='".$datum."', tid = '".$id."'";
	if (($_POST['script1'] != "") and ($_POST['script1'] != " ") and ($_POST['script1'] != "  ") and ($_POST['script1'] != "   "))
	{
		$res = mysql_query($sql);
	}
	if (ISSET($res))
	{
		action("reageert op nieuwsbericht");
	}
	echo "Even geduld a.u.b...";
	echo "<meta http-equiv=\"refresh\" content='1;url=".$_SERVER['HTTP_REFERER']."'>";
}
require_once('footer.php');
?>