Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Netzwerke (https://www.delphipraxis.net/14-netzwerke/)
-   -   Prism POST funktioniert nicht. (https://www.delphipraxis.net/80642-post-funktioniert-nicht.html)

huhn2010 12. Nov 2006 22:31


POST funktioniert nicht.
 
Hallo

Ich habe mich mal an einem Post in einem Forum über einen POST versucht. kann mir jemand sagen, warum der POST nicht ankommt.

Delphi-Quellcode:
 
  parama:= TIdMultiPartFormDataStream.Create;
  parama.AddFormField('_charset_' ,'utf-8');
  parama.AddFormField('uid',userid);
  parama.AddFormField('text','Hallo Welt');
  parama.AddFormField('submit','Senden');
  parama.AddFormField('bestaetigung','0');

  host:='http://www.planetromeo.com/'+session+'/msg/?id='+messageid;
  memo2.Lines.Add('verwendete URL = '+host);
  memo1.Lines.Add(IdHTTP1.Post(host,parama));
Code:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>huhn2010 | Message</title>
<link href="/css/css.php/11.2" type="text/css" rel="stylesheet" />
<!--[if gte IE 5]>
<link href="/css/css.php/ie-fix/13.2" type="text/css" rel="stylesheet" />
<![endif]-->
<script src="/js/js.php/54.941" type="text/javascript">
</script>
<script src="/js/js.php/msg/29" type="text/javascript"></script>
<script>
if (markMessageAsRead) markMessageAsRead(8281761);
</script>
</head>

<body class="pMe">

<table class="header">
   <tr>
      <td>[url="#"]Verlauf[/url]</td>
      <td>[url="#"]User speichern[/url]</td>
      <td>[url="?action=save&amp;id=8281761"]Sichern[/url]</td>
      <td class="delete">[url="index.php?action=delete&amp;id=8281761"]Löschen[/url]</td>
   </tr>
</table>
   
<div class="msg">
   Von:[url="#"] Name [/url]
   <font color="#00ff00">Online</font>
   


   Am:12.Nov.23:28


   <div style="margin-top:10px">bla</div>
</div>

<form method="post" action="index.php?action=send&amp;ie7fix=" name="f" accept-charset="UTF-8" target="_top">
   <input type="hidden" name="_charset_" value="utf-8" />
   <input type="hidden" name="uid" value="271913" />
   <div class="reply">
      <div class="addPicLink" style="padding:0 !important; margin:0 !important">
         [url="#"]Bild anhängen[/url]
      </div>
      <div class="thanks">
         [url="?action=nothanks&amp;id=8281761"]Nein Danke[/url]
      </div>
      


      <textarea name="text" tabindex="1" id="txt" class="textbox"></textarea>
      <input class="button" type="submit" id="id_submit" value="Senden" tabindex="2" />
      <input type="checkbox" name="bestaetigung" id="id_bestaetigung" value="1" tabindex="3" />
      <label for="id_bestaetigung">Lesebestätigung</label>
   </div>
   <div id="addPics"></div>
</form>
   
<script>
   var el=document.getElementById('txt');
   if (posY(el) < wHght()) {
      el.focus();
   }
</script>
</body>
</html>
thxalot

[edit=Phoenix]Formatierung auf Vordermann gebracht. Mfg, Phoenix[/edit]

marabu 13. Nov 2006 11:26

Re: POST funktioniert nicht.
 
Herzlich willkommen in der Delphi-PRAXiS.

Bei flüchtigem Durchlesen wundert es mich doch, dass du beim Aufruf der Methode Post() einen ganz anderen URL angibst, als den im Formular festgelegten.

Freundliche Grüße vom marabu


Alle Zeitangaben in WEZ +1. Es ist jetzt 08:24 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz