Thanks Lynne!
That took care of the security token issue.
I will get back with the code for the dropdown / caching-issue. My code is now quite long, split on several files but I can reproduce the same problem with a simple dropdown form.
Jan
--------------- Added [DATE]1302609805[/DATE] at [TIME]1302609805[/TIME] ---------------
Here is a sample code:
PHP Code:
$myname = vB::$vbulletin->input->clean_gpc('r', 'me', TYPE_STR);
$a='<form action="" method="POST">';
$a.='<select name="me">';
$a.='<option value="noname" >[Name]</option>';
$a.='<option value="Jan" ';
if ($myname=="Jan"){
$a.=' selected="selected" ';
}
$a.='>Jan</option>';
$a.='<option value="Lynne"';
if ($myname=="Lynne"){
$a.=' selected="selected" ';
}
$a.='>Lynne</option>';
$a.='</select>';
$a.='<input type="hidden" name="securitytoken" value="'.vb::$vbulletin->userinfo[securitytoken].'"/>';
$a.='<br><input type="submit" value=" Submit " />';
$a.='</form>';
$output=$a;
If caching is disabled in ACP: / Settings / Options .../ Disable Content Caching = Yes then this code works as I would expect, ie the selected name is marked Selected and shown by the dropdow.
But if the caching option set to No in ACP then $myname does not contain a return value after submittig the form, so the code will not work.
I have set Cache Refresh Time = 0 (and tried -1 and 1 as well) for this php direct evaluation page content itself, but it does not seem to make any difference.