12-21-2023, 04:58 PM
Simply use TIdHTTP.Post() with a TStringList as input containing name=value pairs. That will send an HTTP request in the standard application/x-www-form-urlencoded format, just like a web browser would send for a basic HTML <form> element.
For example:
And then on the PHP side, you can use $_POST to read in the values, eg $_POST['From'], etc.
For example:
Code:
var
PostData: TStringList;
begin
PostData := TStringList.Create;
try
PostData.Add('From=' + ...);
PostData.Add('To=' + ...);
PostData.Add('Message=' + ...);
IdHTTP1.Post(url, PostData);
finally
PostData.Free;
end;
end;And then on the PHP side, you can use $_POST to read in the values, eg $_POST['From'], etc.

