anyone knows how to not refresh the page when send POST request?
Archived 2 years ago
X
XIREU IQ
Verified
Hi guys, im now making chatGPT project, my idea is:
1. First thing, taking the data from the user and send it to php file.
2. Handling the data that has been sent from html file to php file which is send request to openAI API.
3. then return the data that have been handled from php file to JavaScript file to print it in the screen.
But just when i make the POST request, the page getting refresh and all data been removing, so anyone know how to save data from removing and keep the page from refreshing?
Thanks for helping.
