So PHP won't let me use NOW() on my MySQL query, saying " Fatal error: Call to undefined function now()". I'm not sure what I did wrong and everything I find has now in a string working fine. Table structure for table 'news': |ID(int, auto-increment)|date(date)|content(text)|
$content = $_POST['content'];
$dbc = mysqli_connect(MOTD_DB_HOST, MOTD_DB_USER, MOTD_DB_PASS, MOTD_DB_NAME);
$query = "INSERT INTO news VALUES (0, NOW(), '$content')";
mysqli_query($dbc, $query);
[edit] Interestingly enough, it appears the info was added to the database. The query is going through but also causing the script to exit with an error.
[edit 2] so yeah I'm new to stack overflow. The question has been answered, I just don't know how to mark this as answered...