Yii 1.0 $_POST empty after redirect
code first ^&^
public function actionUpdate($id) { $model=$this->loadModel($id); // Uncomment the following line if AJAX validation is needed // $this->performAjaxValidation($model); if(isset($_POST['Version'])) { //the value does not show here.?? print_r($_POST); $model->attributes=$_POST['Version']; if($model->save()) $this->redirect(array('update','id'=>$model->id)); } $this->render('update',array( 'model'=>$model, )); }
EN : the print_r($_POST),
will show empty because the ->redirect is working....even you redirect to the same action, it will not show, because the values is gone.
A stupid mistake ^&^ ~~
Leave Comment