/php/mt.php'); $mt = new MT(<$MTBlogID$>, '<$MTCGIServerPath$>/mt.cfg'); $db = $mt->db(); $entry = $_POST['entry_id']; $query = "select entry_password from mt_entry where entry_id = $entry"; $pass = $db->get_var($query); $pass_sent = $_POST['post_password']; if($pass_sent == $pass) { setcookie('mt-postpass_' . md5($pass), $_POST['post_password'], time() + 864000,''); } header('Location: ' . $_SERVER['HTTP_REFERER']); ?>