TCGIDatamodule not work with POST method lazarus / 8-Other ---------------------------------------------------------------------- ebarruda · 2009-12-01 14:30 An application with TCGIDatamodule works well with the GET method, but does not work with POST method. With the POST method variables/values of the HTML form is always empty. // Lazarus code procedure TCGIDatamodule1.DataModuleCGIRequest(Sender: TObject); var   StringListVar: TStringList;   I: integer;   N, V, Password: string; begin   CGIDatamodule1.ContentType := 'text/html';   EmitContentType;   StringListVar := TStringList.Create;   Application.GetRequestVarList(StringListVar, false);   if StringListVar.Count > 0 then     for I := 0 to StringListVar.Count - 1 do begin       StringListVar.GetNameValue(I, N, V);       if UpperCase(N) = UpperCase('mypassword') then Password := V;     end;   AddResponseLn('');   AddResponseLn('');   AddResponseLn('  ');   AddResponseLn('  CGI Lazarus - Test');   AddResponseLn('');   AddResponseLn('');   AddResponseLn('

Your password is: ' + Password + '

');   AddResponseLn('');   StringListVar.Free; end; // HTML code      Test

CGI LAZARUS - TEST

PASSWORD:

I set up variable REQUEST_METHOD = POST in RUN - RUN PARAMETERS. Am I doing something wrong? I forgot something? Thank you, Ericson Benjamim. ---------------------------------------------------------------------- Loesje · 2009-12-28 22:19 Where did you get the TCGIDataModule from? Is it from fcl-web? Which fpc-version do you use? ---------------------------------------------------------------------- ebarruda · 2009-12-29 17:42 I am using Lazarus 0.9.29 with FPC 2.3.1 from SVN. I started a New project by File / New... / Simple CGI Module.