Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

Get / Post Question On Custom Cgridview Button

$
0
0
Hi

I have been using the POST button described in this wiki.

At the top of my controller, I have the following
public function filters()
{
	return array(
		'accessControl',
	 	'postOnly + email', // access 'actionEmail' action via POST request only
	);
}


'actionEmail' is executed without error, which means that the button must be creating a POST request, which is correct. But the following code - in the action - sets the value of $test to 1 instead of 2.

if(isset($_GET['id']))
{
	$test=1;
}
if(isset($_POST['id']))
{
	$test=2;
}


Any ideas why?

Viewing all articles
Browse latest Browse all 18717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>