// mmm... so what is that?
$dataProvider=new CActiveDataProvider('Block');
$dataProvider= $sessiondata;
I would suggest:
public function actionIndex()
{
$session=new CHttpSession;
$session->open();
$societyName=$session['societyName'];
$criteria=new CDbCriteria;
// assuming you made a mistake with the field name
$criteria->addCondition('society_name=:society_name');
$criteria->params = array(':society_name'=>$societyName);
$this->render('index',array(
'dataProvider'=>new CActiveDataProvider('Block', array('criteria'=>$criteria)),
));
}
why do i get a ‘400 error your request is invalid’ when i click view and update in the manage page.i have enabled the access rules in my controller but still i am getting error.
mmm… I think is something to do with parameter handling… Go to your controller’s update and view action and remove the parameter $id, then use $_GET[‘id’] to get that parameter within the function. If that solves the problem, then is something with your URL mapping settings