prepare("SELECT * FROM posts WHERE id = :pid"); $stmt->bindParam(":pid", $pid); $stmt->execute(); $post = $stmt->fetch(PDO::FETCH_OBJ); if($current_userID != $post->user_id){ echo "Hey, that's not your post!"; exit(); } $text = $post->text; $iv = $post->iv; $tag = $post->tag; $text = decrypt($text, $current_key, $iv, $tag); echo "

".date("F j, Y", strtotime($post->date))."

"; echo "

".str_word_count($text)." words delete

"; echo "
".$text."
"; ?>