From form to web page based on form content

M

MDBJ

Goal- Have US visitors to my site type in a zipcode and click submit,
then a link to a map web site with directions from their zipcode to my
destination opens in a new window

Research- says I need to have a CGI script on my webserver convert the
formdata to generate the web page.

Prior to this, I've only ever made static webpages with fixed links.

can anyone point me to
1-a simple freeware cgi script that will insert formdata and make a link to
a new page
or
2- a good primer on simple cgi scripts that includes the education to wrtie
what I need
(#2 preferred--I'd like to be able to do more)

Thank you
 
L

Lloyd Codrington

Hi MDBJ,

I am not an expert but I know of a good source for CGI script. The URL is:
http://cgi.resourceindex.com some of the scripts are free others are not but
if you can't find the nessasary CGI script here then you must need some new
not yet developed soloution.

Good luck. If you do find a solution please let me know as I will soon be
in the market for a similar solution to a website I am putting together.

Lloyd Codrington
 
M

MDBJ

Tom Gahagan said:
This is not a trivial request. You are asking for a lot.
Yes it can be done..... but........ more than likely you are steeping into
high cotton.
I don't have the expertise, but it seemed a simple thing to add a
formcomment and make a url

take this url
http://maps.google.com/maps?saddr=XXXXX&daddr=1600+pennsylvania+ave+washington+dc&hl=en

Say I'm the POTUS, and I want people to be able to get to my house
I take the zipcode (XXXXX) and make a url from the above, changing the XXXX
to the form data

If someone types in 90210 into the zipcode box and hits submit, I want it to
make and open a page that says
http://maps.google.com/maps?saddr=08234&daddr=1600+pennsylvania+ave+washington+dc&hl=en

Ok..... did your research producde other options like...
asp
php
javascript

Why JUST cgi?

Doesn't have to be.. the options I see for the form from withing FP
allow me to choose the data be delivered to (besides email and a CSV file)
a custom ISAPI NSAPI CGI or ASP script.

Would I find (would you reccomend) something that FP can connect a form to
that
would be an easier system (not cgi) ? would ASP be a better method?
(I'm going to go investigate asp in this connection immediately right now)

I did see some tutorials that came close, I shall look more.
it was my inability to find a good match for what I wanted
that prompted me to try here.
A good source of scripts for a number of scripting lanquages and the web
is....

www.hotscripts.com

I'll run through it, thanks.
 
T

Tom Gahagan

MDBJ said:
Goal- Have US visitors to my site type in a zipcode and click submit,
then a link to a map web site with directions from their zipcode to my
destination opens in a new window
This is not a trivial request. You are asking for a lot.
Yes it can be done..... but........ more than likely you are steeping into
high cotton.
Research- says I need to have a CGI script on my webserver convert the
formdata to generate the web page.

Ok..... did your research producde other options like...
asp
php
javascript

Why JUST cgi?
Prior to this, I've only ever made static webpages with fixed links.
See first answer......
can anyone point me to
1-a simple freeware cgi script that will insert formdata and make a link
to a new page
or
2- a good primer on simple cgi scripts that includes the education to
wrtie what I need
(#2 preferred--I'd like to be able to do more)

Google is your friend!
Look around for tutorials.... there are lots of them around for free.

A good source of scripts for a number of scripting lanquages and the web
is....

www.hotscripts.com


Best to you........
Tom Gahagan
 
T

Tom Gahagan

I don't have the expertise, but it seemed a simple thing to add a
formcomment and make a url
The interface is a simple thing.
The engine that produces the results is another matter all together.
Think about it......

You have to accept a zipcode
analyze where that zip code is
Then where it is in relation to you
Then construct a map of how to get from that zip code to your street.
As I've said.... it can be done.... but it is not trivial.
I'm really not sure as to what is out there as far a mapping software that
has all this info already done for you. I would be it exists. You might want
to search around for the engine but I would be prepaired to pay some bucks
for it. but then again... heck ... you might find something for next to
nothing.

Best to you.......
Tom Gahagan
 
T

Tom Gahagan

I did a google search on mapping software....
this looked interesting.....

http://www.agismap.com/

You might try that search yourself or perhaps

online mapping software

and see what you get.

Best to you.......
Tom Gahagan
 
T

Tom Gahagan

Oh!!! sorry I was so slow in understanding your question! :)

Not sure how you you would populate the google map feature with a vaule from
your form.

Best to you......
Tom Gahagan
 
M

MikeR

If your host supports FP extensions and asp:
Create a new html page and copy and past the below into notepad, then copy from
notepad and paste it between the body tags (in HTML view). I'll leave it to you to
make it pretty.

<form method="POST" action="map.asp">
<input type="text" name="T1" size="20"> Enter your zipcode<input type="submit"
value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>

Create another page, and in HTML view, do the copy and paste trick again with the
code below. This is all the page needs. Delete everything else. Save it as
map.asp. This page will not be seen. Replace the POTUS's address with the one you
want of course.

<%
newurl = "http://maps.google.com/maps?saddr="
newurl = newurl + request.form("T1")
newurl = newurl + "&daddr=1600+pennsylvania+ave+washington+dc&hl=en"
response.redirect newurl
%>
The reason for copying first into notepad is to remove formatting that frontpage
will scramble otherwise. The first page sends the zipcode entered to the second
page in the variable T1, as a member of the request object. I haven't done any
error checking or validation.
Hope this helps....
MikeR
 
M

MDBJ

Thank you.

Although, my wife is gonna want to hunt you down.
I recognized enough of this to realize, I cam learn this,,,

I went looking for more, learning this stuff is easly comparable from the
applesoft-qbasic jump
i made previously..

I've found my next self-learning project.. thanks!
 
M

MikeR

Glad to be of service. I hide from wives pretty good. Wait...that doesn't sound
right. Anyhow, happy learining.
MikeR
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top