Posted on 2009-02-09
The user is presented with a photograph and a form. One of the form items is 'people' and next to the form input is a button labeled 'add'. The user is able to put a name in and click 'add', the name shows up below the input box. At this point the user can add or remove items from the list until they get the desired names of people represented in the photo. Then they will hit the 'submit' button to send the information to the PHP code to be added into the database. So it seems to me that it would be best to do the add/remove in a client side situation.
I have used hidden input fields to get the names on the screen but I am unsure of where to go from there. I need the items that are in the hidden inputs to be in an array. Should I use SESSIONS? That doesn't seem right either.
I feel that I am missing something here. The hidden inputs idea for this application seems to be cumbersome and messy. Is there a better method to achieve this? Can I use ajax to make this more streamlined and easier to interact with? Point me in the right direction!