i want to get a single data from $_POST, the field on the form is called “parametro”, and its being saved on $_POST[‘Caracterizacion’], i want to get this “parametro” and save it as string on a var, how to get this data?
i want to get a single data from $_POST, the field on the form is called “parametro”, and its being saved on $_POST[‘Caracterizacion’], i want to get this “parametro” and save it as string on a var, how to get this data?
You can use:
Yii::app()->request->getParam('Caracterizacion');
this is will return your parameter type POST/GET
i suppose this will show me everything that has been gathered from the user on Caracterizacion, but i want to get something specific from it, the fields are: "Parametro", "Decreto", "Cotizacion".
i just want to get Parametro, not all of them.
it gives me an error "array to string conversion"
What you mean is:
$param = Yii::app()->request->getParam('Caracterizacion');
$value = $param['Parametro'];
i fixed this by doing $_POST[‘Caracterizacion’][‘parametro’], thanks anyways