prepare("INSERT INTO blogs (author, title, category, description, content, date, status) VALUES (?, '', '', '', '', ?, ?)"); $stmt->bind_param("iss", $user_id, $date, $status); $stmt->execute(); $blog_id = $stmt->insert_id; header("Location: blog_edit.php?token=" . encryptData($blog_id, $salt)); exit;