Answer the question
In order to leave comments, you need to log in
How to send data from the form to the current file (without switching to another page)?
Good evening. The following question arose: how to make sure that when submitting data from the form, the page does not go to the script page, and the script, so to speak, is executed on the current page, possibly with a reload of it itself. That is, in the usual case, we write like this: <form method="post" action="1.php">
But if I leave the action field empty (somewhere I found that in this case the script will be executed on the current page) or specify the "#" attribute, then it gives an error and again I have to do everything with crooked transitions.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question