Answer the question
In order to leave comments, you need to log in
How to get POST data on Yii2 in Activeform?
I receive POST data, I need to process and save it, but I don't know how to implement it.
This is how I get the data
<input name="ik_co_id" value="<?php echo $ik_co_id = trim(stripslashes($_POST['ik_co_id'])); ?>" />
<?= Html::activeTextInput($model, 'ik_co_id', ['class'=>'form-item req', 'value' => "$_POST['ik_co_id']"]) ?>
Answer the question
In order to leave comments, you need to log in
<?= Html::activeTextInput($model, 'ik_co_id', ['class'=>'form-item req', 'value' => "{$_POST['ik_co_id']}"]) ?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question