N
N
nnkrasovok2019-06-09 18:48:11
Yii
nnkrasovok, 2019-06-09 18:48:11

How to pass the values ​​of checkboxes to another page outside the form?

I display it on the users page. everyone has a checkbox. if several users are selected, then it is necessary that when the button is pressed, a transition to another page occurs and only selected users are displayed. how to do it?

<?$consultants = Profile::find()->all() ?>
                            <?foreach ($consultants as $consultant): ?>
                            <div class="row">
                            <div class="col-lg-1 text-center" style="padding-top: 160px">
                                <div class="checkbox">
                                    <label><input type="checkbox"> </label>
                                </div>
                            </div>
                            <div class="col-lg-11">
  //пошел блок вывода пользователя
<?endforeach;?>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Savenko, 2019-06-09
@savenko

In the inputs, specify the user id, when sending the data, the data will either go to GET or POST (depending on what is used when submitting the form), make a request to the database by id and get a full description of the users.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question