Hi! Anyone knows how to get POST parameters with the same name?
Yii::app()->request->getParam(‘delete’); only retrieve the last one.
Hi! Anyone knows how to get POST parameters with the same name?
Yii::app()->request->getParam(‘delete’); only retrieve the last one.
getParam() gets both POST and GET vars (so internally the arrays are merged, not really but semantically) so if you have a GET named ‘delete’ and a POST named ‘delete’ it will return the one in GET.
You’ll need to use getQuery() (GET) and getPost() (POST) together to get both.