Sandesh B Suvarna
Sandesh B Suvarna

Reputation: 15

Yii framework: chtml::button on submit pass argument

CHtml::button('Update',array('submit' => array('link/update', array('id'=>$data->linkId)))

The url submitted

localhost/yiiTest2/index.php?r=link/update&0%5Bid%5D=5

Hw to remove this 0%5B and %5D????

Upvotes: 1

Views: 10293

Answers (1)

dInGd0nG
dInGd0nG

Reputation: 4114

The syntax for submit yu are usin is wrong. Try this

CHtml::button('Update',array('submit' => array('link/update', 'id'=>$data->linkId)))

Upvotes: 8

Related Questions