<?php
include ("inc/inc_connect.php");
include ("inc/inc_getdate.php");
$cleantext = $comment;
include ("inc/inc_swearfilter.php");
$reply = $cleantext;

$query = "INSERT INTO $gallerycommentstable (strName, memComment, strTime, strDate, intTieTo) values( '$gfcookie[1]', '$reply', '$time', '$date', '$tieto')";
mysql_query( $query, $link ) or die ( "Error! : ".mysql_error() );

header("Location: gallerypicture.php?imageid=$imageid&groupid=$groupid&topicid=$topicid&imtitle=$imtitle#addcomment");
exit;