Reputation: 1211
So just for my general knowledge about the yii framework i was trying to get a specific value from the form after it was submited, I manged to do it get the value buy doing the following
$model->attributes=$_POST['Newsletter'];
echo $_POST['Newsletter']['email'];
Is there any other way to do it like a specific way to do it in the yii framework
Upvotes: 0
Views: 21
Reputation: 6781
You can try this:
echo $model->email;
because after populate the model using this:
$model->attributes=$_POST['Newsletter'];
you have the model with the posted values.
Upvotes: 1