Thanks for all the great answers, this helps a lot!
Hello, I need some advice/help (obviously)
I'm pretty new to jquery/ajax in general but I have been able to do quite a bit so far. Here is what I am TRYING to do and then what I have managed to do so far.
I am trying to emulate the wordpress post categories. Where you are writing a post and then when you want to add it to a category it lets you just create new checkbox categories on the spot!
I have managed to get it working to where I send the request to a php script and it adds the record to my DB and then it appends the new checkbox to the bottom of my list. The issue I have is that I need to return the two values from PHP, the ID and the NAME. Right now I can return the name but I am not sure how to return them separately so that I can manipulate them in the JS.
I might be going about this in the wrong way completely. The idea is that I would create the new category records and then append them back to the category list using JS and then I would checkmark them and when I click "save" the values (IDs) would be sent to the current row (post) in the DB.
I hope i'm making some sense. If you have any questions please ask away and if you have any ideas or answers please let me know!
Thanks!