check captcha in controller

i need to check captcha in controller so i must get captcha session value from session table. when i check session table i see something like

Yii.CCaptchaAction.3bbe352e.controllername.captcha|s:7:"xemobin"

what is this 3bbe352e?

is this value constant and can i check captcha session in controller like this?


if ($session['Yii.CCaptchaAction.3bbe352e.controllername.captcha']==$_POST['captcha'])

is there any better solution to check captcha in controller?

[color="#006400"]/* moved to the right forum */[/color]

Doubt it.

Rather than asking for better solutions to check a CAPTCHA in a controller you should explain why you can’t do this in a (form) model.

at now i call action controller with


ajaxbutton()

and pass data with


js:'$("mydiv").serialize(sortable)'

.if i use form submit (form model) instead of ajaxbutton how to send data collected by js?

a solution maybe is


<input type="hidden" name="name" value="<?php 'js:$("mydiv").serialize(sortable)' ?>">

any suggestion?