MyBB Community Forums

Full Version: Posthash
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
What does the posthash do in the attachment table?
It is used when adding attachments. When you add an attachment to a post/thread (not when editing but when posting) there is no thread id or post id already generated. The posthash simply tells the script which attachments are to be assigned to your new post. If you take a look at the hidden form fields on the reply/new thread pages you will see ther is a posthash one. Once your post is submitted any attachments with the posthash the same as the one from the posting page will be updated to contain tid and pid information..