Hi,

Thanks for your help, but still I am not getting the same results when I do
post to php script.

This is PHP script

> <?php
> echo "Note = ". $_POST['note'];
>
> if($_POST['action'] == 'i')
>  {
>   /*
>   * This code will add new notes to the database
>   */
>   $sql = "INSERT INTO app_notes VALUES ('', '" .
> mysql_real_escape_string($_POST['username']) . "', '" .
> mysql_real_escape_string($_POST['note']) . "', NOW(), '')";
>   $result = mysql_query($sql, $link) or die('0 - Ins');
>   echo '1 - ' . mysql_insert_id($link);
> ?>
>
and this is the delphi code:
 data := Format('date=%s&username=%s&password=%s&hash=%s&note=%s&action=%s',
[UrlEncode(FormatDateTime('yyyymmddhh:nn',now)),
UrlEncode(edtUserName.Text),  UrlEncode(getMd5(edtPassword.Text)),
UrlEncode(getMd5(dataHash)),UrlEncode(Utf8Encode(memoNote.Text)),'i'  ]); //
try function StrHtmlEncode (const AStr: String): String; from IdStrings
HttpCli1.SendStream := TMemoryStream.Create;
HttpCli1.SendStream.Write(Data[1], Length(Data));
HttpCli1.SendStream.Seek(0, 0);  HttpCli1.RcvdStream :=
TMemoryStream.Create;  HttpCli1.URL := Trim(ActionURLEdit.Text);

  HttpCli1.PostAsync;


But the PHP script is getting totaly different characters ?
Any clue what this can be?
Thanks.
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to