Re: How do I insert a cgi script into Publisher page?



David

I put together a routine that I use with success: Look it over please and see if I make sense. I will do another one for PHP. I am leaning towards PHP more and more as it is somewhat easier if you like modifying scripts.

======
CGI Mail form
If your ISP supports cgi and has a form handling program then a form created in publisher will function using FTP upload rather than front page server extensions to upload the pages.

You must tell the server what e mail address you want the form results sent to. Some ISP's are different than others. Check with the ISP help section on handling forms for that information.

Locate the cgi form handler file on the server. It is probably in the cgi or cgi-bin folder. Again ISP's are not all the same.

For example, if the form handler is in the cgi folder and it is named myform.cgi then the path for the handler in publisher will be " /cgi/myform.cgi " without the quotes.


In publisher create a page for your form and build the form.
In the form properties window select "Use a program from my ISP"
In the action section insert the path you discovered above. Example for godaddy.com is " /cgi/gdform.cgi " without the quotes.

From method is Post

In the hidden fields window: enter under Item "subject" no quotes an in the item value for subject enter a subject line that you want on the form when you receive it.


Below the subject enter "redirect" no quotes if you want have a thank you page built and in the item value enter the path to your thank you page

Example: " /thank_you/thankyou.htm " the thankyou.htm file is located in the thank_you folder in the root directory.
The thank you page may have a link back to the page where you came from or any where else you so desire or an auto redirect script with a delay.
The auto redirect script is inserted using the HTML fragment function and looks like:

<meta http-equiv="Refresh" content="4; url=/index.htm">

In this case the time delay is 4 seconds and the page that will come up is the index.htm.

=========

"DavidF" <Nope@xxxxxxxxxx> wrote in message news:uq5TZ$vsJHA.4968@xxxxxxxxxxxxxxxxxxxxxxx
Spike is the one with the most experience with using something other than FrontPage Server Extensions to power the forms, so hopefully he will jump into this thread and offer some more information. But in the meantime...

I don't think you will have to "name your order form". I think what Spike was suggesting was that the way you wrote the link was incomplete, and that you needed to add the extension. I would just try it and see what happens. One thing to keep in mind is that unless you make that link an absolute link instead of a relative link, it won't work from your local computer. It is looking for the cgi folder on your server when you use the relative link. So you may have to upload your pages in order to test it.

Here is another resource for you that might help explain the forms in Publisher:
Reference: Web forms:
http://office.microsoft.com/en-us/publisher/CH063576891033.aspx

If you test it and it still doesn't work as per Spike's suggestions after uploading the pages, then post back and let us know. Also provide us a link to your host and specifically where on the host website it gives you the instructions for using the forms program in the cgi folder. Then perhaps we can help further.

DavidF


"Monika" <Monika@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:6311AA11-01D7-45E5-97D3-7FE0D0E55A91@xxxxxxxxxxxxxxxx
Oh, I did not know that David B has been inactive for some time. But now
looking at the date ...

Anyway, yes, I saw Spike's advise and it was very helpful to a certain point
( I now know whre to put the command) but did not solve my problem. His
command was /cgi/myform.cgi. Does this mean that I will have to name my order
form. In fact, I inserted this order form by using one of the templates and
would not know if this one has a name and were to find it.

Sorry, if I sound a little daft but since this is my very first website, I
am a little lost presently :-). Thank you very much for your support.

Monika

"DavidF" wrote:

David Bartosik has been inactive for a number of years now, so I wouldn't
hold my breath waiting for an answer from him.

I see that Spike answered your other post. Did that give you enough
information?

DavidF

"Monika" <Monika@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:ACBEF744-3AF2-4A31-8BAA-BBF4275791C9@xxxxxxxxxxxxxxxx
> David,
>
> I would need some advice about this subject too. Could you explain to > me
> how
> to find out the URL of the script? Will I have to ask my server or > should
> I
> be able to find out going into my account with the server?
>
> Thank you very much.
>
> Monika
>
> "David Bartosik [MSFT MVP]" wrote:
>
>> You have to use the form controls under "Insert, Form" to build a >> form.
>> You
>> then set the form properties (under submit button) to run the host >> side
>> cgi.
>> You'll see under the form properties the option to "use my ISP's
>> program",
>> you set that option to the URL of the script. Once on your server the
>> form
>> is filled out by the user and the submit button then hands the values >> of
>> those form controls over to the cgi script. After that it is up to >> the
>> script and your host side programming to do whatever.
>>
>> David Bartosik - [MSFT MVP]
>> www.publishermvps.com
>> www.davidbartosik.com
>>
>> "Randy" <Randy@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> news:D6FD6E83-C9DB-4AF1-B31D-85FAD833762D@xxxxxxxxxxxxxxxx
>> > On my web site http://www.randypoole.com I have a contact form so I >> > can
>> > get
>> > info from my clients, However it does not work. Do I need a cgi >> > script
>> > on
>> > my
>> > host to get it to work or something else I'm not doing right? I >> > want it
>> > to
>> > send me the info, then redirect them to a page so they can search >> > for
>> > homes.
>>
>>
>>





.


Loading