对不起..我不懂英文...
我想向他们发送所有列表框项目。
我的代码(发送到第一项);
var
i: Integer;
satir: Integer;
str: TStringList;
response: TStringStream;
begin
str := TStringList.Create;
Response:= TStringStream.Create('');
satir := ListBox1.Items.Count;
try
str.Clear;
IdHTTP1.Disconnect;
str.Add('author='+Edit1.Text+'');
str.Add('email='+Edit2.Text+'');
str.Add('url='+Edit3.Text+'');
str.Add('comment='+Memo1.Text+'');
str.Add('comment_post_ID='+'1'); // Hidden items. When I delete the error does not.
for i:= 0 to satir do
begin
IdHTTP1.Post(ListBox1.Items.strings[i],str,Response);
IdHTTP1.Disconnect;
MessageDlg('Ok.', mtinformation,[mbOK],0);
end;
except
on e: exception do
begin
str.Free;
Response.Free;
end;
end;
end;
如果你纠正我的错误,我会很高兴。