I've been working at this and I just can't get this. Can anyone please tell me why this just will not work?
function procNewsStory() {
global $session, $database;
$admin = $session->username;
$date = time();
$title=$_POST['title'];
$story=$_POST['story'];
$story_id = time();
$q = "INSERT INTO " .TBL_SITE_NEWS. " VALUES ('$admin', '$time', '$title', '$story', '$story_id')";
$database->query($q);
header("Location: ".$session->referrer);
}
This just will not post to my DB and I can't understand why. I'm sure my query() function is right.