I am trying to build a jQuery functionality for which the scenario is given below.

Consider a user clicks on an image in the website, a jQuery dialogue box pops up on the page. The dialogue box has a text field to enter the 'alternative text' for the image. When the user clicks on the submit button, the text from this page should get saved into my central website's database along with the url of the image.

I have been able to get the jQuery dialogue box working (by going step and step in jQuery) with the following code <http://pastebin.com/nxALvAPP>

But I wanted the help to save the 'image text' and it's url in the database from. How can that be done? I am not really a pro.

Thanks for help!