Illegal variable _files or _env or _get or _post o

birken 30 May, 2008
Hello,


i have looked thru the forum but cant find the soulution for my problem but i can see at many others have the same problem like me.

i get this error when i submit my form:

Illegal variable _files or _env or _get or _post or _cookie or _server or _session or globals passed to script.

i am using joomla 1.0.15 Stable

my form look like this below, i appreciate if anyone could help me with this.

warm regards anders
<?php 
	global $database;
	
	srand((double)microtime()*10000);
	$inum	=	"I" . substr(base64_encode(md5(rand())), 0, 16);
	
	
$database->setQuery( "INSERT INTO #__chronoforms_2 VALUES  (
'' ,
'".$inum."',
'". date('Y-m-d')." - ".date("H:i:s")."', 
'".$_SERVER['REMOTE_ADDR']."' , 
 '".mosGetParam($_POST,'recipient','')."' ,
 '".mosGetParam($_POST,'subject','')."' ,
 '".mosGetParam($_POST,'redirect','')."' ,
 '".mosGetParam($_POST,'realname','')."' ,
 '".mosGetParam($_POST,'Foretag1','')."' ,
 '".mosGetParam($_POST,'namn1','')."' ,
 '".mosGetParam($_POST,'e-post','')."' ,
 '".mosGetParam($_POST,'kundnr','')."' ,
 '".mosGetParam($_POST,'Tel','')."' ,
 '".mosGetParam($_POST,'text1','')."' ,
 '".mosGetParam($_POST,'UV1','')."' ,
 '".mosGetParam($_POST,'UV2','')."' ,
 '".mosGetParam($_POST,'UV3','')."' ,
 '".mosGetParam($_POST,'UV4','')."' ,
 '".mosGetParam($_POST,'UV5','')."' ,
 '".mosGetParam($_POST,'UV6','')."' ,
 '".mosGetParam($_POST,'UV7','')."' ,
 '".mosGetParam($_POST,'UV8','')."' ,
 '".mosGetParam($_POST,'UV9','')."' ,
 '".mosGetParam($_POST,'UV10','')."' ,
 '".mosGetParam($_POST,'v25','')."' ,
 '".mosGetParam($_POST,'v26','')."' ,
 '".mosGetParam($_POST,'v27','')."' ,
 '".mosGetParam($_POST,'v28','')."' ,
 '".mosGetParam($_POST,'v29','')."' ,
 '".mosGetParam($_POST,'v30','')."' ,
 '".mosGetParam($_POST,'v31','')."' ,
 '".mosGetParam($_POST,'v32','')."' ,
 '".mosGetParam($_POST,'v33','')."' ,
 '".mosGetParam($_POST,'v34','')."' ,
 '".mosGetParam($_POST,'kontakta','')."' ,
 '".mosGetParam($_POST,'Submit','')."');" );
if (!$database->query()) {
echo "<script> alert('".$database->getErrorMsg()."'); window.history.go(-1); </script>
";
}
?>
GreyHead 30 May, 2008
Hi birken,

This code belongs in the Autogenerated code box and looks OK to me. Please will you psot the code from the Form HTML box.

When we last saw this error it came from an illegal field name - don't see any here though.

Bob
birken 30 May, 2008
Hello Bob,

thx for taking time for me. I did generate my whole table with text also.

see below:

warm regards Anders

[code]<table border="0" cellspacing="0" cellpadding="0" width="479">
<tbody>
<tr>
<td><span class="articleHead">Semesterplanering 2008</span>
<hr id="null" />

<table width="480" border="0">
<tbody>
<tr>
<td><font size="2">kommer att leverera fruktkorgar samt tillbehör måndagar och onsdagar under veckorna 27 t.om 33. Precis som vi gjorde förra året.</font></td></tr></tbody></table><font size="2">
GreyHead 30 May, 2008
Hi birken,

That all looks OK too. It's late here here now. I'll try it in a form in the morning.

Bob
GreyHead 31 May, 2008
Hi Anders,

I copied your Form HTML into a clean copy of test_form in Joomla 1.5 and it submits perfectly I don't get the same error as you.

What kind of data is being submitted? I wonder if there is something there?

Bob
birken 31 May, 2008
hi,

i deleted the one i did and made a new and it work perfect now.

i will try on another site and then i will buy this fantastic component.

and thx for a quick support.

Warm regards Anders
GreyHead 31 May, 2008
Hi Andres,

Thanks, glad to hear that it's working OK now.

Bob
thomasjojo 23 Apr, 2009
I got this error with the brand new component, and I sorted it out that the cause is;
form elements name used numbers.

I changed the names of formelements to letters, and it work smooth as it should

Thomas
GreyHead 24 Apr, 2009
HI thomasjojo,

Good catch. HTML field names are not allowed to start with a number and is looks as though the Joomla security blocks this.

Bob
This topic is locked and no more replies can be posted.