Hi,
Is it possible to specify which controller/action should be invoked using POST instead of GET?
Hi,
Is it possible to specify which controller/action should be invoked using POST instead of GET?
sure!
two ways you can invoke POST request to server:
<form action="<?php echo $this->createUrl(‘controller/action’); ?>" method=“get/post”>
url = "<?php echo $this->createUrl('controller/action'); ?>";
params = {
'p1': someVaule,
'pX': valX,
....
}
$.post(url.params,function(res){
});
If you are using a CActiveForm widget then you can set the method property in the instantiation options of beginWidget().
Thanks!