Unable to save Form

Hello,

I updated my site from joomla 1.5 to Joomla 2.5.
Everything works fine except some forms that use the plugin Email.
In Email To (Eval), I have the following code:

$ db = JFactory :: getDBO ();
$ cyclo = JRequest :: GetVar ('joskj_depenses_mysql_2___ID_CYCLO');
$ sql = "select email from joskj_users Where id_cyclo cyclo = $;"
$ db-> setQuery ($ sql);
$ email = $ db-> loadResult ();
return ($ email);

If I try to save the form, I get the error message 403.
Now, if I delete 'SELECT' code above, I can save the form.

Why the word SELECT is not allowed?

Thank you very much.
Regards
 
I assume all spaces after $ are manual formatting (not really in your code)?
and it should be
$sql = "select email from joskj_users Where id_cyclo = $cyclo";

is joskj_ your actual DB prefix?
 
Hello,

In fact, the real mistake was a bad "cut and paste" of the code.
The correct code is really the following :

$db = JFactory :: getDBO ();
$cyclo = JRequest :: GetVar ('joskj_depenses_mysql_2___ID_CYCLO');
$sql = "select email from joskj_users Where id_cyclo=$cyclo;";
$db-> setQuery ($sql);
$email = $db-> loadResult ();
return ($email);

I temporarily solved the problem by saving the form without the word SELECT then I edit the record with PhpMyAdmin and I add the word SELECT.
And that works.
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top