U
U
Uzair Izha2015-11-07 20:58:58
PHP
Uzair Izha, 2015-11-07 20:58:58

How to build a condition?

70944dd75c964826ad613fae250081a8.PNG
Now, if the user selects a company, then the request to the database No. 1, and if he selects a store, then No. 2. That is, depending on what is selected, send a request to the database.

Is this possible to do in PHP? Or can't you do without jQuery? I don't need AJAX, everything just works on the button, that is, after clicking on submit, the values ​​​​will be sent to the database. I need before that, so that the data changes when selected.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir, 2015-11-07
@UZEIR

If this is a regular form without JS, then you don’t need to drag it in, do server-side validation using PHP. It's easy to do this in the GET or POST superglobal array (depending on your form method), there will be the value of your radio, and there is already a simple if()..else...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question