redirect() problem


public function accessRules()

	{

		//user selected for admin

		$user = UserInfo::model()->findAllBySql("select user_name from user_info where type_id='0' or type_id='1'");

		$man=array("1","1");

		foreach($user as $m):

			array_push($man, $m->user_name);

		endforeach;

		

		return array(

			array('allow',  // allow all users to perform 'index' and 'view' actions

				'actions'=>array('index','view'),

				'users'=>array('*'),

			),

			array('allow', // allow authenticated user to perform 'create' and 'update' actions

				'actions'=>array('createSaleOrder','create','action'),

				'users'=>array('@'),

			),

			array('allow', // allow admin user to perform 'admin' and 'delete' actions

				'actions'=>array('admin','delete'),

				'users'=>$man,

			),

			array('deny',  // deny all users

				'users'=>array('*'),

			),

		);

	}

	

	public function actionCreateSaleOrder()

	{

 		$baba = $_POST['textSaleOrder'];

		$this->redirect(array('createSaleOrder', 'id' => $baba));//Error

	}

When actionCreateSaleOrder() is call but redirect() not working. URL is correct but page not displayed.

Browse says

############################################################

The page isn’t redirecting properly

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

This problem can sometimes be caused by disabling or refusing to accept

cookies.

############################################################

please reply how to fixed it.




$this->redirect(array('createSaleOrder', 'id' => $baba));



You’ve created an infinite loop here, you are redirecting to the same place.

Now how can i solved it.

Why are u redirecting to the same action createSaleOrder?

When u call createSaleOrder action by url, it will redirect to itself recursively.

Oh my god. Sorry sorry sorry

I can fixed it

Thank you all

No need to be sorry, we all have our moments.