On Tue, Jul 13, 2010 at 5:20 PM, Michael Van Canneyt
<mich...@freepascal.org> wrote:
> My mistake, the correct name is 'Queryfields':
>
> Avar:=Request.QueryFields['MyVar'];

Well, that takes an integer as argument, not a string, but I managed
to build my own routine for that. If something like that isn't already
in svn fpweb then it should probably be added:

function TFPWebModule1.GetQueryFieldByName(ARequest: TRequest; AName:
string): string;
var
  i, StrIndex: Integer;
  Str: string;
begin
  for i := 0 to ARequest.QueryFields.Count - 1 do
  begin
    StrIndex := Pos('=', ARequest.QueryFields[i]);
    Str := ARequest.QueryFields[i];
    if Copy(Str, 1, StrIndex - 1) = AName then
    begin
      Result := Copy(Str, StrIndex + 1, Length(Str) - StrIndex);
      Break;
    end;
  end;
end;


-- 
Felipe Monteiro de Carvalho
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to