H
H
HolmesInc2015-12-05 23:53:08
PHP
HolmesInc, 2015-12-05 23:53:08

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

1 answer(s)
S
sunrails, 2015-12-05
@sunrails

javascript.ru/ajax/intro

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question