How to make comments, for example, in stackoverflow?
What I mean more specifically, I use php / mysql, as if to add a comment without reloading the page, I know that this is a simple process of using AJAX, but when you post a comment on SO, it also has the ability to delete it right away when I insert comments into my database, the identification number of the car is increasing, so my real question is now
After posting a comment, a comment is posted, added only to the page with some javascript to add content to the page
OR
Does AJAX use this comment you just posted and then display it on the page?
The reason I am wondering is because, since my system uses auto increment ID, then if I made it the first method, which would be faster, to just declare the content that I posted when sending, but this the method would not give me the identifier, which is necessary in order to be able to delete a comment by identification number
Hope that makes sense
UPDATE
I posted below what I think now, after reading the other posts here.
source
share