shayan
(Shayan3001)
1
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?
jacmoe
(Jacob Moen)
2
[color="#006400"]/* moved to the right forum */[/color]
Tropi
(Daniel Lang)
3
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.
shayan
(Shayan3001)
4
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)' ?>">