After update redirect to privious page

Hi all,

I am having difficult redirecting back to previous page that was active before update.

I use pagination, suppose I go to 2 page and update one data, after submit it goes back to first page but I want to go back 2 page not first page. How do I go back to 2 page?

Thanks

Nemo

You can use this code




		if(isset($_POST['Meeting']))

		{

			$model->attributes=$_POST['Meeting'];

			if($model->save())

			echo "  <script type='text/javascript'>

  						self.history.go(-2);


 		        </script>";

		      //$this->redirect(array('index','id'=>$model->MeetingID));

		}




self.history.go(-2);-> You can replace -1,-2,-3… etc.

Thanks John_453P. It’s working solution.