🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.web
Article #800

Re: Indy version, Post method

#800
From: Denville Longhurst
Date: Tue, 31 Jan 2006 23:33
97 lines
4149 bytes
OK, here is a simple, working form that illustrates what I want to achieve
from a BCB application using Indy (TIdHTTP v 8.0.25).  The first few hidden
inputs are necessary to set up the 3rd party PHP script which e-mails me the
contents and bounces back the acknowledgment.  The MyName and MyTown inputs
represent real data.

Thanks for your time.  (Sorry if you got this twice, I clicked Reply instead 
of Reply Group.)

//---------------------------------------------------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Simple Form </title>
<style type="text/css">
<!--
.style1 {font-family: "Courier New", Courier, mono}
-->
</style>

</head>
<form name="FplForm" action="http://cgi.uk2.net/cgi-bin/uk2-formmail.pl"
method="POST">

<input type="hidden" name="recipient" value="fpl@metco.co.uk">
<input type="hidden" name="env_report"
value="REMOTE_HOST,REMOTE_ADDR,HTTP_USER_AGENT">
<input type="hidden" name="print_config" value="email,realname,subject">
<input type="hidden" name="sort" value="order:message">
<input type="hidden" name="print_blank_fields" value="1">
<input type="hidden" name="redirect"
value="http://www.metco.co.uk/MyTemp/FplWeback1.htm">
<input type="hidden" name="email" value="a.pilot@metco.co.uk">

<p>Name<input name="MyName" type="text" id="MyName" value="Denville"></p>
<p>Town<input name="MyTown" type="text" id="MyTown" value="Leeds,
England"></p>

<p><input type="submit" name="Submit" value="Submit"></p>

</form>
</body>
</html>
//---------------------------------------------------------------------------


"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message 
news:43dfa6dd$5@newsgroups.borland.com...
>
> "Denville Longhurst" <Denville@metco.co.uk> wrote in message
> news:43df9c82@newsgroups.borland.com...
>
>> I want to mimic a simple form (three or four fields) and post
>> the data to a web site
>
> How you do that exactly depends on how the PHP script is set up.  Please
> show the HTML for the form so we can see what kind of values the server is
> expecting to be sent.
>
>> I have BCB6 SP2.  I guess I need to use TldHTTP.
>
> Yes.
>
>> In my help, it doesn't even document a Post (or a Get) method
>
> TIdHTTP is a third-party component, not a Borland one.  You can download 
> the
> documentation from http://www.indyproject.org.
>
>> but I know they are there.
>
> Yes, there are - several different flavors, in fact.
>
>> How do I find what version of Indy I have in my BCB setup.
>
> Right-click on any Indy component in the Form Designer.
>
>> If I need to upgrade, how do I do that (the Indy site sends me round in
> circles) ?
>
> Did you read the Indy Knowledge Base yet?  There are install instructions 
> in
> it.
>
>> How to I put the post data (eg Name=Denville, Address=Leeds)
>> into the Post command and get the return result to a String or String 
>> List
> ?
>
> Again, it depends on what the HTML looks like.
>
>
> Gambit
>
> 
Technical Details
Message-ID: <43dff36a@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!proxad.net!oleane.net!oleane!grolier!194.74.65.66.MISMATCH!news-peer0-test!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <43df9c82@newsgroups.borland.com> <43dfa6dd$5@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,e22aba21c3053d6a
X-Google-Attributes: gidfeeec,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Denville Longhurst" <Denville@metco.co.uk>
Newsgroups: borland.public.cppbuilder.internet.web
References: <43df9c82@newsgroups.borland.com> <43dfa6dd$5@newsgroups.borland.com>
Subject: Re: Indy version, Post method
Date: Tue, 31 Jan 2006 23:33:13 -0000
Lines: 99
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 80.0.6.88
Message-ID: <43dff36a@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1138750314 80.0.6.88 (31 Jan 2006 15:31:54 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!proxad.net!oleane.net!oleane!grolier!194.74.65.66.MISMATCH!news-peer0-test!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail