stringlist Guest
|
Posted: Thu Feb 19, 2004 8:32 pm Post subject: How to read data posted via TIdMultiPartFormDataStream? |
|
|
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
|
|