// add the field. // the third parameter is no_html, set it to true to strip html, or false to allow html $content->addMeta($key, $value, true); } } foreach ($_FILES as $filename => $file) { $content->addFile($filename, $file); if (!$content->success()) { $POD->addMessage('An error occured while attaching your file: ' . $content->error()); } } $content->files()->fill(); } else { $POD->addMessage("Error! " . $content->error()); } $msg = implode("\n", $POD->messages()); if (isset($_POST['redirect'])) { if ($_POST['redirect'] == "permalink") { $redirect = $content->get('permalink'); } else { $redirect = $_POST['redirect']; } } header("Location: {$redirect}?msg=" . urlencode($msg)); } else { if ($_GET['id']) { $content = $POD->getContent(array('id' => $_GET['id'])); if (!$content->isEditable()) { header("Location: {$redirect}?msg=" . urlencode("Access Denied")); } else { $POD->header("Edit " . $content->get('headline'));