Yii Framework Forum: $_REQUEST is returning null - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

$_REQUEST is returning null

#1 User is offline   deepak_php 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 09-March 15

Posted 21 April 2017 - 04:58 AM

Attached File  sdas.png (44.43K)
Number of downloads: 3

I am able to get the multiple values of the checkbox but unable to pass them to the controller action


controller code:-

public function actionIndex()
    {
        $searchModel = new QueueSearch;
        $dataProvider = $searchModel->search(Yii::$app->request->getQueryParams());
		
		//print_r($_REQUEST);
		//exit;
		if(!empty($_REQUEST['multiple_del'])){
			$rows=$_REQUEST['selection'];
			for($i=0;$i<count($rows);$i++){
				$this->findModel($rows[$i])->delete();
			}
		}
        return $this->render('index', [
            'dataProvider' => $dataProvider,
            'searchModel' => $searchModel,
        ]);
    }


0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users