sorry.. I know little english...
I want to send them all listbox items.
My codes (sent to the first item);
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;
If you correct my mistakes I would be happy.