its probably somthing small. but i have no idea what it is.
also, when it runs through phpMyAdmin's sql page, it works fine.
Code: Select all
if($_POST["submit"])
{
$username = $auth->userdata["username"];
$title = $_POST["title"];
$content = $_POST["content"];
$query = "INSERT INTO news (newsid, username, title, date, content, editdate) VALUES ('', '$username', '$title', UNIX_TIMESTAMP(), '$content', '0')";
$db->query($query);
echo "News posted successfully.";
break;
}