I got my CGI form send working!
Mar. 8th, 2007 12:16 amIf you're not a web geek, the following will probably be supremely uninteresting.
I was working on my GPS Potty web site, specifically the rest area submission page tonight in class. I've never done anything with CGI and forms before, and I got it working! It was easier than I expected. The Dreamweaver form designer did a very easy job of making the form itself, including setting maximum field lengths and combo boxes. Then setting up everything for the CGI was pretty simple. You create a template file linked to the field names on the HTML page that is saved as a text file. In the HTML page, at the start of the form declaration, you point to your web site's CGI directory and the name of your form script, mine is a script called CGIEMAIL developed (or at least archived) at MIT, that declaration also points to the template file. Finally, the code for the Submit button (I think) references a function in the script through value="Send e-mail", but that name might vary depending upon the CGI script.
Anyway, what I ended up with as an email that looks like the following:
Your Name? Wayne
Your Email Address? xxxxx@yahoo.com
State? nm
Highway/Interstate Name? x
Direction of Travel? North
Nearest Mile Marker before Rest Area: y
Latitude? x
degrees? q
direction? North
Longitude? q
degrees? q
direction? West
Name of Facility? q
Facility Type? Full Service
General Description? q
So now I need to start working on a PHP/database interface so that (1) people can upload sites directly into a temporary database that I can review directly online then copy them into the live table, and (2) generate the site lists directly from a database table. I also want to have a couple of code routines that convert latitude/longitude into a different format so that I can directly link them to Google Maps so that a user can directly see where any given rest area is. Another routine that I want is one that would directly produce a file that you could upload straight into your GPS that would have your waypoints right there for you. And finally, a program that would maintain a user login/preferences system, not unlike the Geocaching site. I imagine that I'll learn how to implement the third item as I pursue the database integration issue.
The thing that sucks is that I still have my hosting service issue hanging over my head. I submitted a post to Slashdot asking for hosting suggestions as I have not yet found a really good comparison of hosting services online, but my submission has been marked as pending for over a week. I have a feeling that I'll end up with DreamHost, but I'm not looking forward to it as they're more than twice what I was paying at Scottsdale Hosting.
I was working on my GPS Potty web site, specifically the rest area submission page tonight in class. I've never done anything with CGI and forms before, and I got it working! It was easier than I expected. The Dreamweaver form designer did a very easy job of making the form itself, including setting maximum field lengths and combo boxes. Then setting up everything for the CGI was pretty simple. You create a template file linked to the field names on the HTML page that is saved as a text file. In the HTML page, at the start of the form declaration, you point to your web site's CGI directory and the name of your form script, mine is a script called CGIEMAIL developed (or at least archived) at MIT, that declaration also points to the template file. Finally, the code for the Submit button (I think) references a function in the script through value="Send e-mail", but that name might vary depending upon the CGI script.
Anyway, what I ended up with as an email that looks like the following:
Your Name? Wayne
Your Email Address? xxxxx@yahoo.com
State? nm
Highway/Interstate Name? x
Direction of Travel? North
Nearest Mile Marker before Rest Area: y
Latitude? x
degrees? q
direction? North
Longitude? q
degrees? q
direction? West
Name of Facility? q
Facility Type? Full Service
General Description? q
So now I need to start working on a PHP/database interface so that (1) people can upload sites directly into a temporary database that I can review directly online then copy them into the live table, and (2) generate the site lists directly from a database table. I also want to have a couple of code routines that convert latitude/longitude into a different format so that I can directly link them to Google Maps so that a user can directly see where any given rest area is. Another routine that I want is one that would directly produce a file that you could upload straight into your GPS that would have your waypoints right there for you. And finally, a program that would maintain a user login/preferences system, not unlike the Geocaching site. I imagine that I'll learn how to implement the third item as I pursue the database integration issue.
The thing that sucks is that I still have my hosting service issue hanging over my head. I submitted a post to Slashdot asking for hosting suggestions as I have not yet found a really good comparison of hosting services online, but my submission has been marked as pending for over a week. I have a feeling that I'll end up with DreamHost, but I'm not looking forward to it as they're more than twice what I was paying at Scottsdale Hosting.
no subject
Date: 2007-03-08 12:12 pm (UTC)no subject
Date: 2007-03-08 06:06 pm (UTC)I don't like that.
(see http://nodaddy.com/ and the Slashdot thread.)
So I registered gpspotty.com on http://www.nearlyfreespeech.net/, they're highly regarded in the geek community, inexpensive, and have interesting policies. I prefer to keep my domain registration and hosting separate, and though NearlyFreeSpeech seems to have a good hosting service, I'm not certain their features meet my needs. And with Scottsdale Hosting not talking about their future, I'm left to fend for myself and my best interests.
My problem with GoDaddy is purely philosophical. Eventually I'll migrate all my domains to NFS.
I briefly considered using GoDaddy for hosting, but Scottsdale Hosting's prices were flat-out amazing, and I've had excellent service from them for two years. But now there's too much uncertainty, and my hosting contract is up in about two weeks.
no subject
Date: 2007-03-08 08:21 pm (UTC)Let me know what you end up with and how it works out, I'm always on the lookout for a good host.
no subject
Date: 2007-03-08 08:09 pm (UTC)no subject
Date: 2007-03-08 09:07 pm (UTC)no subject
Date: 2007-03-08 10:22 pm (UTC)