So I'm developing a page on my site that has been giving me some problems. I want to have two forms on a page, one to add data and one to delete data. After submitting a form, deletion or addition of data will be performed by two different php files, those php files will print feedback, and peform a change to the database. I want the feedback(output from the php page) inserted into div#content1. After the addition of data or deletion of data has occured, div#content2 needs to be reloaded becuase it contains the content that is being added to or deleted from.
Here is a picture explaining it further:
So the pseuedocode would be something like this:
If form 1 button is clicked
Run deletedata.php and print output to div content1
reload div content2
end
If form 2 button is clicked
Run adddata.php and print output to div content1
reload div content2
end
So my questions are:
A. Is this possible?
B. How do I do it with jquery?