K
K
Kolya2015-07-07 16:37:21
PHP
Kolya, 2015-07-07 16:37:21

How to execute the code, depending on the open tab in the browser?

There is a checkout form in the store, in which there are two tabs, for unregistered users, and for registered ones, and an order confirmation button, depending on the selected tab, the "Confirm order" button must execute a different code, in the first case, register a user, authorize and confirm order, in the second just authorize and confirm the order. How to do this check on active tab?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Vsk, 2015-07-07
@viktorvsk

In different "tabs" it is necessary to generate different forms.
Or change the action of the form, for example, by adding a parameter action="register.php?action=new_user"
Or add a field with type=hidden and add a certain parameter there

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question