BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to read data posted via TIdMultiPartFormDataStream?

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock
View previous topic :: View next topic  
Author Message
stringlist
Guest





PostPosted: Thu Feb 19, 2004 8:32 pm    Post subject: How to read data posted via TIdMultiPartFormDataStream? Reply with quote



Hi,

i use the following code

data := TIdMultiPartFormDataStream.Create;
try
data.AddFormField('to', 'xxx-yyy (AT) zzz (DOT) net');
data.AddFormField('subject', 'yes it works');
data.AddFormField('text', 'Hi, test successful');
Memo1.Lines.Text :=
IdHTTP1.Post('http://member.lycos.xy/abcdef/test01.php', data);
finally
data.Free;
end;

....to send some data to a php-script. But unfortunatly in this script its
not possible to get this data back.

I tried a script like this:

<?php
echo $_POST['to'];
mail($_POST['to'], $_POST['subject'], $_POST['text']);
?>

Instead of $_POST i also used $_GET. Both with no result. No echo-answer for
'to' in Memo1.Lines.Text and no email was sended. Does anybody know how a
right script has to look like? (Perhaps its also possible to read the data
at first via HTML-code?)

Thx in advance


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.