P
P
picka2021-08-09 02:37:26
React
picka, 2021-08-09 02:37:26

How to send data from a React form to a php page and redirect the user to the same page?

I have a form on Next.js, when filled, the function of sending data via fetch is executed.
If I don’t specify event.preventDefault() in the function, then I get something completely different (I don’t even know how to describe it).
I just hope that someone has already encountered such a situation and will be able to correctly describe it, and show an example of a solution.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question