CHtml::imageButton method can use an image as a button, but the submission method is not post,
It may also be GET, I haven’t tried GET.
Write this in view:
if(isset($_GET['id']))
{
echo CHtml::imageButton(Yii::app()->baseUrl.'/images/button1.png',array('submit' => 'action1?id='.$_GET['id']) ) ; //
with parameters
Echo chtml :: ImageButton (yii :: app ()-& gt; baseUrl. '/Images/Button2.png', Array ('Submit' = & GT; 'Controller2/Action2'); //
?>
This can be submitted.
But in the action of the controller
Cannot get POST www.2cto.com
if(isset($_POST['Post']))
{
}
Author: georgelife7