Question: I want to put a checkbox on each row in a GridView, and also link that GridView with a submit button, like this image:
[![enter image description here](https://i.stack.imgur.com/L8VWW.png)](https://i.stack.imgur.com/L8VWW.png)

The objective is for each checked and unchecked row do an Insert on a certain table from the database. I need help, please.

This the code for the GridView I have for now:

```
<?= GridView::widget([
        'dataProvider' => $dataProvider,
        'columns' => [
            ['class' => 'yii\grid\SerialColumn'],

            'rutAlumno',
            'nombreAlumno',
            'apellidoAlumno',
            'cursoAlumno',

            //['class' => 'yii\grid\ActionColumn'],
        ],
    ]); ?>

```

Answer: 
My solution was pretty simple and I feel espacially dumb. Somehow my /etc/hosts file was changed (MAMP ? My fault ?) and the 

> 
> 127.0.0.1 localhost
> 
> 
> 

part was missing. So the machine couldn't use the localhost as 127.0.0.1

Hope this helps a poor someone someday :/
I also got the same error when running a nightwatch.js test and my problem was also due to a wrong entry to the /etc/hosts file:

0.0.0.0 localhost

The error went away after the above entry was removed.