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



Spike,

Good job. I will try to follow the instructions myself when I have time to
see where or if things are unclear to me. A few first impressions though:

Though Publisher uses 'ISP' I think that may be confusing to some as my ISP
is not where I host my website. Instead of using just 'ISP', perhaps it
would be useful to define 'ISP/website host' at least the first time you use
ISP or just use 'website host' instead. Perhaps this is picky as I knew what
you meant, but others might not.

You alluded to this several times, but you might be more specific about how
different ISPs/Website hosts offer different form handler programs, and that
the user should go to their webhost 'help' section, or perhaps 'Support',
'Knowledge Base' or maybe even 'FAQs section' to find what form handler the
host supports and the directions for using their form handler. From my
experience of going to the various hosts this information can be hard to
find sometimes, so I also always look for a search field in the 'help'
section and search for 'forms'. That almost always saves me time in finding
the information. I am of course not suggesting that you use all these words,
but perhaps in your own more succinct style ;-), give the poster a little
more direction of how to find what forms their host supports and how to find
the directions. Once they do, chances are your directions will be work in
general regardless of what forms handler program they have.

You and Don tend to use relative links and paths, but I think that it might
be more clear if posters use absolute links/paths in general. For example
when you double click the submit button, and then the 'form properties'
button, and the 'use a program from my ISP' then this is what is given as
the sample link: http://example.microsoft.com/~user/ispscript.cgi I guess
what I am saying is that people can sometimes understand an absolute link
easier than they can a relative one.

I will try your directions to see if I can follow the rest but it looks like
good information. I will look forward to trying out your PHP directions too.
Thanks for taking the time to write this up. I think helping people move
away from FPSE is a good idea...especially since they can use FTP uploading.

DavidF


"Spike" <zero_spam@xxxxxxxxxx> wrote in message
news:Om2AXQxsJHA.2532@xxxxxxxxxxxxxxxxxxxxxxx
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.










.