Dropdownlist : Show previously sleceted value when updating

I have researched a lot in this topic, but was not able to find a perfect solution.
So i have a dropdown list which when i’m updating a record doesn’t show the previously selected value.It simply shows the prompt value,I want it to show the previously selected one.
Please help me with this .

This is my _form.php

    <?= $form->field($model, 'deptloc')->dropDownList(
        ArrayHelper::map(\app\models\Location::find()->all(), 'id', 'locname'), 
        ['prompt' => 'Select Location'],
        ['options' => [ $_GET['id'] => ['Selected'=>'selected']]]

    <?= $form->field($model, 'deptid')->widget(DepDrop::classname(), [

And this is my actionUpdate:

 public function actionUpdate($id)
        $model = $this->findModel($id);

    if ($model->load(Yii::$app->request->post())) {

        $filename = $model->file;
        // if( ($model->file)== "")
        // {   
        //     $model->save(false);
        //     return $this->redirect(['index', 'id' => $model->empid]);
        // }

        return $this->redirect(['index', 'id' => $model->empid]);

    return $this->render('update', [
        'model' => $model,

I want to put it for both of my dropdown (depdrop as well). How can i achieve this?