I have a textarea element on a page and it's content is saved to my database upon clicking the save button I created. I wanted to create short urls with hash ids like "MySite.com/laHquq" using the unique id (primary key) of the table row where I saved my record containing the information that was in the textarea and this: http://www.hashids.org/ which will "Generate short hashes from numbers (like YouTube and Bitly)." I want to use it to obfuscate the unique primary key for table row with the record containing information from the textarea.
I'm going to have a script place the hash id created (which is obfuscating a primary key) after the forward slash at the end of my domain name in the address bar so the address bar will now have: "MySite.com/laHquq" after the information is saved to my database. This will simply be done to indicate that now the information that was saved in the textarea can be seen again by visiting the site with the hash id after the forward slash.
I will also have a script with a self invoking function that will get the url from the address bar each time the page loads and check for a hash id after the forward slash then use the hash id to find the right information from the db to display in the textarea on the page. I wondered if using hashids: http://www.hashids.org/ will help prevent hash collisions.