I\'m trying to insert data from a form into a database using PHP and Mysqli but I can\'t get it working! My database has 4 fields: DATE, TITLE, CONTENT, ID. The ID field is auto
Since you are aware about prepared statement:
$newBlog = $mysqli->prepare('INSERT INTO Blog (`dateCol`, `titleCol`, `contentCol`) VALUES (?, ?, ?)'); $newBlog->bind_param( 'sss', $blogDate, $_POST["bTitle"], $_POST["bContent"] ); $newBlog->execute(); $newBlog->close();