Answer the question
In order to leave comments, you need to log in
How to build a condition?
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
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 questionAsk a Question
731 491 924 answers to any question