I have table in mysql database and I would like to be able to generate a unique string so that user can input the string that will run the appropriate query and display the result.
Ex)
id | text | view_code <--this would be randomly generated
1 | testing | fsj2343lfs
2 | another_test | fsdflj2dff
There would be a text box on a page that will take view_code as input. If text input matches one of the view_codes in the table, the appropriate record will be displayed to the user.
EDIT: The idea is that I would give user #1 view_code of 'fsj2343lfs' and this will return only record '1 | text' and display it on the webpage. This is to ensure that that user only sees that record, and does not have access to any other records in the database.
Is this a good way of going about this? Is there another way that would work better? Thanks!