assign("eid", $_GET['eid']); $displaypage->assign("noindex", 1); if(empty($_POST['rp'])) { $displaypage->assign("reported", 0); } else { $DB = new DB; $query = "Insert into pk_reports(eid, reason, reportdate, ip, username) values({$_GET['eid']},'{$_POST['reason']}', now(), '{$_SERVER['REMOTE_ADDR']}', '{$_SESSION['username']}')"; $res = mysql_query($query, $DB->link) or die("Error:" . mysql_error()); $displaypage->assign("reported", 1); } $displaypage->display("pk-report.tpl"); ?>