As I am trying to fetch the form data from the URL as its a return URL which I am receiving. Is there any way where I can fetch the form data in jQuery. I am also aware of $_POST in PHP but I am searching for a solution on JQuery.
Asked
Active
Viewed 34 times
1 Answers
0
You could use fetch:
fetch(<URL>, {method: 'POST', body: <data>})
If you need to use jQuery, jQuery has a method called post:
$.post(<URL>,<data>)

TheLudde235
- 128
- 6
-
The URL is sending me form data and I need to fetch that data. But in your answer the methods are sending data to server. But I am receiving data from server already. – Kiran Bhagannavar Apr 11 '23 at 14:14
-
Then I think you want to check out [this post](https://stackoverflow.com/questions/2276463/how-can-i-get-form-data-with-javascript-jquery) instead – TheLudde235 Apr 12 '23 at 07:42