I have a CGridView and for the delete function I want to check if the item in question has a certain ID. I’m assuming its sent through POST but I’m not sure which value it is ($_POST[’
’]). Anyone know how I can access this value in the controller? Thanks.
print_r($_POST);
in your controller to see the $_POST contents and find the right key.
TRY this , in your controller ( delete function )
public function actionDelete($id)
{
if(Yii::app()->request->isPostRequest)
{
print_r($_POST);
...
...