A
A
Alexander Reshetnyak2014-03-12 02:35:46
PHP
Alexander Reshetnyak, 2014-03-12 02:35:46

How can several forms be combined into one?

There are several forms:

<form method="post" action="index.php">
...
</form>

<form method="post" name="vza" action="index.php">
...
</form>

<form method="get" action="index.php">
...
</form>

<form method="post" action="index.php" name="refresh">
...
</form>

<form method="post" name="rla" action="index.php#diff_adress">
...
</form>

I would like to combine them into one, please tell me the solutions ^ ^

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
llexa, 2014-03-12
@llexa

If you need to use one action to process all forms, make the field hidden, which will contain the name of the form (for example, register, login, recover). On the server, you read this field and process the form in the right way (you can use switch-case).
Or specify the problem :)

A
Alexey Likhachev, 2014-03-12
@Playbot

Probably not without details. What is your goal? You have different methods for submitting data from the form, although the processing script 1.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question